User:Lkopeter/vector.js
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
$(function() {
var content = document.getElementById('content');
if(!content) content = document.getElementById('mw_content');
if(!content) return;
var alinks = content.getElementsByTagName('a');
var tablink, sitename;
for (var i = 0, leng = alinks.length; i < leng; i++) {
tablink = alinks[i];
if (tablink.className.indexOf("external") != -1 && tablink.href.indexOf(wgServer) != 0)
tablink.target = "_blank";
}
});