MediaWiki:Common.js: Difference between revisions

From EchinoWiki
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..."
(No difference)

Revision as of 17:40, 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;
	} );
} );