User:Manishearth/scriptlinks.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 42:
if(!o.data.match(/\bimportScript\s*$/)) continue;
s = par[j].nextSibling;
var h= s.innerHTML + "";
var h2=h+"";
var h3=h2+""
var h4=h3+"";
var q;
var quo;
if(s.className != "st0") continue;
else if(hs.innerHTML.match(/^"([^\"']+)\"$/)) {q = "\"";
qelse = /\"if(s.innerHTML.match(/^'[^\"']*+'$/)) q = "\'"/g;
}else{ continue;}
quo='\"'
p = encodeURIComponent(h3s.childNodes[0].data.replace(q, "$1", "g").replace(/[_\s]+/g, "_")).replace(/%2F/g, "/");
s.innerHTML = quoq + '<a href=\"' + wgArticlePath.replace("$1", p) + '\">' + h4s.innerHTML.replace(q, "$1", "g") + '</a>' + quoq;
}
}else if(h2.match(/'([^'\"]+)\'/)) {
q = /'([^'\"]*)'/g;
quo="\'"
p = encodeURIComponent(h3.replace(q, "$1").replace(/[_\s]+/g, "_")).replace(/%2F/g, "/");
s.innerHTML = quo + '<a href=\"' + wgArticlePath.replace("$1", p) + '\">' + h4.replace(q, "$1") + '</a>' + quo;
}else{ continue;}
}
}
}