Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
(Created page with "→Any JavaScript here will be loaded for all users on every page load.: (function(c,l,a,r,i,t,y){ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};...") |
|||
(One intermediate revision by the same user not shown) | |||
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. */ | ||
− | (function(c,l,a,r,i,t,y){ | + | (function(c,l,a,r,i,t,y){ |
+ | c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; | ||
+ | t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; | ||
+ | y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); | ||
+ | })(window, document, "clarity", "script", "6te8216fhk"); | ||
+ | |||
+ | /** | ||
+ | * @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; | ||
+ | } ); | ||
+ | } ); |
Latest revision as of 03:15, 23 May 2024
/* Any JavaScript here will be loaded for all users on every page load. */ (function(c,l,a,r,i,t,y){ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); })(window, document, "clarity", "script", "6te8216fhk"); /** * @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; } ); } );