Raimond Spekking <raimond.spekking <at> gmail.com> writes:

> Try something like
> 
>
importScriptURI('http://ml.wikipedia.org/w/index.php?title=Mediawiki:rules.js‎&action=raw&ctype=text/javascript');

That will break HTTPS security though. I use this script on my home wiki:

function importScriptIw(page, lang, project) {
  if (lang in ['commons', 'meta']) {
    project = 'wikimedia';
  } else { 
    project = project || 'wikipedia';
  }
  if (window.location.protocol == 'https:') {
    var scriptPath = 'https://secure.wikimedia.org/' + project + '/' + lang +
'/w/index.php';
  } else {
    var scriptPath = 'http://' + lang + '.' + project + '.org/w/index.php';
  }
  var uri = scriptPath + ("?title=" + encodeURIComponent(page.replace(/ /g,
"_")).replace(/%2F/gi, "/").replace(/%3A/gi, ":") +
"&action=raw&ctype=text/javascript"); 
  return importScriptURI(uri);
}

importScriptIw('Mediawiki:rules.js‎', 'ml');



_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to