User:维基佛祖/global.js

kernel = []; kernel.g = function{ var tags = document.getElementsByTagName("a"); for(var i=0; i<tags.length; i++){ var a = tags[i]; if(tags[i].class == "mw-pt-progress mw-pt-progress--low"){ console.log("Skip this A tag"); continue; }else{ if(tags[i].title == "编辑本页[alt-shift-e]"){ console.log("Skip this A tag"); continue; }else{ if(tags[i].class == "uls-trigger"){ console.log("Skip this A tag"); continue; }else{ if(tags[i].href == "#column-one"){ console.log("Skip this A tag"); continue; }else{ if(tags[i].title == "编辑本页"){ console.log("Skip this A tag"); continue; }else{ a.target="_blank"; }					}				}			}		}		console.log("tag",i,"( link to",tags[i].href,") ended of processing"); continue; }   document.getElementsByTagName("a")[1].target = ""; document.getElementsByTagName("a")[2].target = ""; document.getElementsByTagName("a")[3].target = ""; console.log("Tool buttons link target=_blank removed") } kernel.reload = function{ self.location = window.location.href; } kernel.back = function{ history.back; } document.getElementById('siteNotice').innerHTML = document.getElementById('siteNotice').innerHTML+" 刷新页面 返回上一页 设置链接在新窗口打开 ";