User:Verdy p/monobook.js
Appearance
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Deprecation of Javascript functions in Mediawiki:
importScript
importScriptURI
importStylesheet
importStylesheetURI
See: https://www.mediawiki.org/wiki/ResourceLoader/JavaScript_Deprecations
https://www.mediawiki.org/wiki/ResourceLoader/Default_modules#mw.loader.load
*/
function importScriptWP(lang, page) {
mediaWiki.loader.load('//' + lang + '.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=' + encodeURI(page), 'text/javascript');
// was: importScriptURI('https//' + lang + '.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=' + encodeURI(page));
}
function importStylesheetWP(lang, page) {
mediaWiki.loader.load('//' + lang + '.wikipedia.org/w/index.php?action=raw&ctype=text/css&title=' + encodeURI(page), 'text/css');
// was: importStylesheetURI('https://'+lang+'.wikipedia.org/w/index.php?action=raw&ctype=text/css&title=' + encodeURI(page));
}
importStylesheetWP('en','User:Verdy_p/common.css');
importScriptWP('en','User:Verdy_p/common.js');