On 11/01/2010 09:29 AM, Tisza Gergő wrote:
Raimond Spekking<raimond.spekking<at> gmail.com> writes:
Try something like importScriptURI('http://ml.wikipedia.org/w/index.php?title=Mediawiki:rules.js%E2%80%8E&ac...');
That will break HTTPS security though. I use this script on my home wiki:
Here's another one from http://commons.wikimedia.org/wiki/User:Ilmari_Karonen/monobook.js:
/** * Load a script from another Wikimedia wiki. Based on importScript() in wikibits.js. * Does the right thing also when used via the secure server. * * Usage example: importScriptFromWiki("User:Ilmari Karonen/replace.js", "en", "wikipedia"); * * Leave the third parameter empty for wikis like meta or commons that have ".wikimedia.org" * host names but belong internally to the "wikipedia" group for historical reasons! */ function importScriptFromWiki(page, lang, domain) { if (wgServer == 'https://secure.wikimedia.org') { if (!domain) domain = 'wikipedia'; var prefix = '/' + domain + '/' + lang; } else { if (!domain) domain = 'wikimedia'; var prefix = 'http://' + lang + '.' + domain + '.org'; if (prefix == wgServer) prefix = ""; } var uri = prefix + '/w/index.php?title=' + encodeURIComponent(page.replace(/ /g,'_')).replace(/%2F/ig,'/').replace(/%3A/ig,':') + '&action=raw&ctype=text/javascript'; return importScriptURI(uri); }