mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
Merge "Don't render popup on "javascript:..." links."
This commit is contained in:
commit
4cba605476
|
@ -124,7 +124,7 @@
|
|||
};
|
||||
|
||||
/**
|
||||
* Register the hover event on links
|
||||
* Register a hover event that may render a popup on an appropriate link.
|
||||
*
|
||||
* @method setupTriggers
|
||||
*/
|
||||
|
@ -134,11 +134,14 @@
|
|||
$this = $( this ),
|
||||
href = $this.attr( 'href' );
|
||||
|
||||
// No popup if scrolling or on certain kinds of links.
|
||||
if (
|
||||
mw.popups.scrolled || // Prevents hovering on popups while scrolling
|
||||
href.indexOf( '?' ) !== -1 ||
|
||||
href.indexOf( 'javascript:' ) === 0 || // jshint ignore:line
|
||||
href.indexOf( location.origin + location.pathname + '#' ) === 0
|
||||
) {
|
||||
// TODO No popup for this, but removeTooltips() has already blanked the title.
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue