Last modified: 2012-04-16 09:16:15 UTC
My global javascript at [[m:User:Hazard-SJ/global.js]] Is only loading on some sites, like [[en:]] and [[commons:]], but not sites like [[simple:]], [[meta:]], and [[testwiki:]] which have been updated to 1.19wmf1.
Do you get any errors?
I can load and execute a global.js from meta with just: alert("hi!"); I suspect there are some Resource Loader problems in your code. These will need to be fixed, or your code will probably stop working. I suspect the problem is with this function: function importAnyScript(lang,family,script) { document.write('<script type="text/javascript" src="' + 'http://' + lang + '.' + family + '.org/w/index.php?title=' + script + '&action=raw&ctype=text/javascript"></script>'); } You probably want to replace that with: function importAnyScript(lang,family,script) { mw.loader.load('//' + lang + '.' + family + '.org/w/index.php?title=' + script + '&action=raw&ctype=text/javascript'); } In fact, when I copied your global.js, and replaced your importAnyScript() function with my version, it worked.
Thanks.