User:Year2000Prob/monobook.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 10:
var format = function(wscript, src) {
var deflang, lang, source = src;
return wscript.replace(/\{{3}lang\|([a-z]{2}\-[A-Za-z]{2}|[a-z]{2,6})\}{3}/, function(m) {
var deflang = m[1];
if (/^([a-z]{2}\-[A-Za-z]{2}|[a-z]{2,6})\:/.test(source)) {
var n = source.match(/^([a-z]{2}\-[A-Za-z]{2}|[a-z]{2,6})\:/);
lang = n[1];
source = source.substr(n[0].length);