Difference between revisions of "MediaWiki:Common.js"
From BrineRIS Dataspace
Simon Stier (talk | contribs) (add image map) |
Simon Stier (talk | contribs) (show mw-slot-wrapper-header / footer in namespaces different from Main) |
||
Line 7: | Line 7: | ||
//load ImageMapHighlighter | //load ImageMapHighlighter | ||
mw.loader.load( '/w/index.php?title=MediaWiki:ImageMapHighlighter.js&action=raw&ctype=text/javascript' ); | mw.loader.load( '/w/index.php?title=MediaWiki:ImageMapHighlighter.js&action=raw&ctype=text/javascript' ); | ||
+ | |||
+ | if (mw.config.get('wgNamespaceNumber')!==0) { | ||
+ | $("#mw-slot-wrapper-header").attr("style", "display: revert"); /* hidden in MediaWiki:Common.css, show in namespaces different from Main */ | ||
+ | $("#mw-slot-wrapper-footer").attr("style", "display: revert"); /* hidden in MediaWiki:Common.css, show in namespaces different from Main */ | ||
+ | } |
Latest revision as of 10:49, 29 March 2023
/* Any JavaScript here will be loaded for all users on every page load. */
//load ImageMapEditor in Image namespace
if (mw.config.get('wgNamespaceNumber')==6 && mw.config.get('wgAction')=='view') {
mw.loader.load('/w/index.php?title=MediaWiki:ImageMapEditor.js&action=raw&ctype=text/javascript');
}
//load ImageMapHighlighter
mw.loader.load( '/w/index.php?title=MediaWiki:ImageMapHighlighter.js&action=raw&ctype=text/javascript' );
if (mw.config.get('wgNamespaceNumber')!==0) {
$("#mw-slot-wrapper-header").attr("style", "display: revert"); /* hidden in MediaWiki:Common.css, show in namespaces different from Main */
$("#mw-slot-wrapper-footer").attr("style", "display: revert"); /* hidden in MediaWiki:Common.css, show in namespaces different from Main */
}