MediaWiki:Common.js: Difference between revisions
From No Way Out Wiki
Created page with "→Any JavaScript here will be loaded for all users on every page load.: // Load ImageMap highlight on pages that need it mw.loader.using('ext.imageMap').then(function () { mw.loader.load('https://he.wikipedia.org/w/index.php?title=MediaWiki:Scripts/Imagemap-Highlight.js&action=raw&ctype=text/javascript'); });" |
No edit summary |
||
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. */ | ||
// Load ImageMap | |||
// Load the ImageMap highlighter on pages that contain imagemaps | |||
mw.loader.using('ext.imageMap').then(function () { | mw.loader.using('ext.imageMap').then(function () { | ||
mw.loader.load( | mw.loader.load( | ||
mw.util.wikiScript() + | |||
'?title=MediaWiki:Imagemap-Highlight.js&action=raw&ctype=text/javascript' | |||
); | |||
}); | }); |
Revision as of 15:02, 23 September 2025
/* Any JavaScript here will be loaded for all users on every page load. */ // Load the ImageMap highlighter on pages that contain imagemaps mw.loader.using('ext.imageMap').then(function () { mw.loader.load( mw.util.wikiScript() + '?title=MediaWiki:Imagemap-Highlight.js&action=raw&ctype=text/javascript' ); });