Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
mw.loader.load( 'https://cdn.rawgit.com/prtksxna/persistent-toc/master/ptoc.css', 'text/css' ); | mw.loader.load( 'https://cdn.rawgit.com/prtksxna/persistent-toc/master/ptoc.css', 'text/css' ); | ||
mw.loader.load( 'https://cdn.rawgit.com/prtksxna/persistent-toc/master/ptoc.js', 'text/javascript' ); | mw.loader.load( 'https://cdn.rawgit.com/prtksxna/persistent-toc/master/ptoc.js', 'text/javascript' ); | ||
+ | mw.loader.load('//he.wikipedia.org/w/index.php?title=Mediawiki:Scripts/Imagemap-Highlight.js&action=raw&ctype=text/javascript'); | ||
− | + | $(document).ready(function(){ | |
− | + | $('.mw-references-wrap').before('<h2>References</h2>'); | |
− | + | }); | |
− | |||
− | |||
− | |||
− | + | ||
− | + | /* Code snippet to add ImageMapEdit functionality */ | |
+ | if (mw.config.get('wgNamespaceNumber')==6 && mw.config.get('wgAction')=='view') { | ||
+ | mw.loader.load('//imagemapedit.toolforge.org/ime.js'); | ||
+ | } |
Latest revision as of 04:16, 29 September 2020
/* Any JavaScript here will be loaded for all users on every page load. */
mw.loader.load( 'https://cdn.rawgit.com/prtksxna/persistent-toc/master/ptoc.css', 'text/css' );
mw.loader.load( 'https://cdn.rawgit.com/prtksxna/persistent-toc/master/ptoc.js', 'text/javascript' );
mw.loader.load('//he.wikipedia.org/w/index.php?title=Mediawiki:Scripts/Imagemap-Highlight.js&action=raw&ctype=text/javascript');
$(document).ready(function(){
$('.mw-references-wrap').before('<h2>References</h2>');
});
/* Code snippet to add ImageMapEdit functionality */
if (mw.config.get('wgNamespaceNumber')==6 && mw.config.get('wgAction')=='view') {
mw.loader.load('//imagemapedit.toolforge.org/ime.js');
}