mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
9438210889
The definition of "self-link" in this context is an <a href="…"> element that points to the exact same URL as the current document's location, excluding a possibly different #… fragment. This is typically the case when the <a> element does not contain a full URL, but something like href="#fragment". JavaScript's HTMLAnchorElement.href getter automatically expands this to be a full URL. Example: var a = document.createElement( 'A' ); a.href = '#test'; console.log( a.href ); Notes: * This new code assumes the wgPageName setting properly reflects the page name requested via the current document's location. Core does give us this guarantee. * The only URL element that is intentionally not compared is the protocol. * This accidentially fixes T215899 as well, because the namespace check is now bypassed for self-links (as it should). Bug: T214861 Bug: T215899 Change-Id: I2670331cbbdebf7dc9fc70d7342724534f9f54ec |
||
---|---|---|
.. | ||
dist | ||
ext.popups | ||
ext.popups.images |