MediaWiki:Common.js: Difference between revisions

From No Way Out Wiki
No edit summary
No edit summary
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
// ImageMap Highlighter - only load on pages that have the highlighter div
 
if ($('.imageMapHighlighter').length > 0) {
 
    // Paste the entire ImageMap highlighter code here
// Load the ImageMap highlighter on pages that contain imagemaps
     $(document).ready(function() {
mw.loader.using('ext.imageMap').then(function () {
        // [Insert the full script code from your original document]
  mw.loader.load(
    });
     mw.util.wikiScript() +
}
      '?title=MediaWiki:Imagemap-Highlight.js&action=raw&ctype=text/javascript'
  );
});

Revision as of 15:11, 23 September 2025

// ImageMap Highlighter - only load on pages that have the highlighter div
if ($('.imageMapHighlighter').length > 0) {
    // Paste the entire ImageMap highlighter code here
    $(document).ready(function() {
        // [Insert the full script code from your original document]
    });
}