User:Verdy p/vector.js
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.
/* <pre><nowiki> */
/* 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 importStylesheetWM(project, page) {
mediaWiki.loader.load('//' + project + '.wikipedia.org/w/index.php?action=raw&ctype=text/css&title=' + encodeURI(page), 'text/css');
// was: importStylesheetURI('https://' + project + '.wikipedia.org/w/index.php?action=raw&ctype=text/css&title=' + encodeURI(page));
}
function importScriptWM(project, page) {
mediaWiki.loader.load('//' + project + '.wikimedia.org/w/index.php?action=raw&ctype=text/javascript&title=' + encodeURI(page), 'text/javascript');
// was: mw.loader.load('https//' + project + '.wikimedia.org/w/index.php?action=raw&ctype=text/javascript&title=' + encodeURI(page));
}
importStylesheetWM('fr', 'User:Verdy p/common.css');
importScriptWM('fr', 'User:Verdy p/common.js');
/* </nowiki></pre> */