MediaWiki:Common.js: Difference between revisions

From English Grammar
Jump to navigation Jump to search
(Gert indends to allow stundent to start WebTrale from the Wiki and later come back to the page they came from)
 
(No difference)

Latest revision as of 15:08, 19 November 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;
	} );
} );