Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
$('.mw-references-wrap').before('<h2>References</h2>'); | $('.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'); | ||
+ | } |
Revision as of 18:24, 28 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' );
$(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');
}