MediaWiki:Common.js: Difference between revisions

From Samskrita Vyakaranam
Jump to navigation Jump to search
Content added Content deleted
(/* यहां लिखी गई जावास्क्रीप्ट सभी सदस्योंके लिय... नवीन पृष्ठं निर्मीत अस्ती)
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Common JS */
/* यहां लिखी गई जावास्क्रीप्ट सभी सदस्योंके लिये इस्तेमाल में लाई जायेगी। */


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


$( 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
$( '#mw-panel, #panel' ) // #panel is for pre-1.17 compatibility
.find( 'li a' )
.find( 'li a' )

Latest revision as of 15:04, 2 May 2021

/* Common JS */


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


$( 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' );