MediaWiki:Common.js: Difference between revisions
No edit summary Tag: Manual revert |
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. */ | ||
/** | |||
* ImageAnnotator | |||
*/ | |||
// Not on Special pages, and only if viewing the page | |||
if (mw.config.get( 'wgNamespaceNumber' ) !== -1 && ['view', 'submit'].indexOf(mw.config.get('wgAction') ) !== -1 ) { | |||
if (typeof ImageAnnotator_disable === 'undefined' || !ImageAnnotator_disable) { | |||
// Don't even import it if it's disabled. | |||
mw.loader.load( '/w/index.php?title=MediaWiki:Gadget-ImageAnnotator.js&action=raw&ctype=text/javascript' ); // Backlink: [[MediaWiki:Gadget-ImageAnnotator.js]] | |||
} | |||
} | |||
/** SUS */ | /** SUS */ | ||
Revision as of 18:07, 6 January 2023
/* Any JavaScript here will be loaded for all users on every page load. */
/**
* ImageAnnotator
*/
// Not on Special pages, and only if viewing the page
if (mw.config.get( 'wgNamespaceNumber' ) !== -1 && ['view', 'submit'].indexOf(mw.config.get('wgAction') ) !== -1 ) {
if (typeof ImageAnnotator_disable === 'undefined' || !ImageAnnotator_disable) {
// Don't even import it if it's disabled.
mw.loader.load( '/w/index.php?title=MediaWiki:Gadget-ImageAnnotator.js&action=raw&ctype=text/javascript' ); // Backlink: [[MediaWiki:Gadget-ImageAnnotator.js]]
}
}
/** SUS */
document.on('DOMContentLoaded', () => {
const susElement = document.createElement('li');
susElement.id = "footer-places-sus";
const img = document.createElement('img');
img.src = "https://static.revolt.chat/emoji/fluent-3d/1f99d.svg?v=1";
img.width = "64px";
img.height = "64px";
susElement.append(img);
document.querySelector('#footer-places').append(susElement);
});
/** END SUS */