MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
imported>Echinobase Created page with "→Any JavaScript here will be loaded for all users on every page load.: * @source https://www.mediawiki.org/wiki/Snippets/Open_specific_links_in_new_window * @version 201..." |
imported>Echinobase No edit summary |
||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. | /* Any JavaScript here will be loaded for all users on every page load. | ||
* @source https://www.mediawiki.org/wiki/Snippets/Open_specific_links_in_new_window | * @source https://www.mediawiki.org/wiki/Snippets/Open_specific_links_in_new_window | ||
* @version 2018-09-15 | * @version 2018-09-15 |
Latest revision as of 16:49, 11 February 2020
/* Any JavaScript here will be loaded for all users on every page load. * @source https://www.mediawiki.org/wiki/Snippets/Open_specific_links_in_new_window * @version 2018-09-15 */ $( function () { $( '#mw-content-text' ).on( 'click', '.newwin > a', function () { var otherWindow = window.open(); otherWindow.opener = null; otherWindow.location = this; return false; } ); } );