MediaWiki:Common.js: Difference between revisions

From Samskrita Vyakaranam
Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
Line 14: Line 14:
.filter( "[href^='http://'], [href^='https://']" )
.filter( "[href^='http://'], [href^='https://']" )
.attr( 'target' , '_blank' );
.attr( 'target' , '_blank' );

document.getElementById("top").href = "https://samskritavyakaranam.miraheze.org";

Revision as of 14:31, 2 May 2021

/* Common JS */

$( function () {
	$( '#mw-content-text' ).on( 'click', '.newwin > a', function () {
		var otherWindow = window.open();
		otherWindow.opener = null;
		otherWindow.location = this;
		return false;
	} );
} );

$( '#mw-panel, #panel' ) // #panel is for pre-1.17 compatibility
	.find( 'li a' )
	.filter( "[href^='http://'], [href^='https://']" )
	.attr( 'target' , '_blank' );

document.getElementById("top").href = "https://samskritavyakaranam.miraheze.org";