mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-15 19:50:04 +00:00
515775685c
This installs a series of safety nets: * The selector [href*="#"] skips links without a fragment. * It's still possible that a fragment exists, but is empty. mwTitle.getFragment() checks this. * The gateway does not assume the element exists, but checks this first. If there is no such element, the gateway aborts the request in a way that no error popup is shown. This is currently only possible with the `{ textStatus: 'abort', xhr: { readyState: 0 } }` response as seen in this patch. We might need to introduce a new, more clean way to silently quit a fetchPreviewForTitle() call. * The test for the reference gateway finally covers the scraping code. Bug: T214970 Bug: T214971 Change-Id: I9ec57e0fbb0d21beaaa7b359c1c2bef64d2c14f5 |
||
---|---|---|
.. | ||
index.js | ||
mediawiki.js | ||
reference.js | ||
rest.js | ||
restFormatters.js |