User:维基佛祖/common.js

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; } console.log("All A tag ended of processing"); kernel = function{return false;} console.log("Kernel root function created"); kernel.reload = function{ self.location = window.location.href; } console.log("Kernel page reloader function created"); kernel.back = function{ history.back; } console.log("Kernel page backer function created"); document.getElementsByClassName('sitenotice')[0].innerHTML = document.getElementsByClassName('sitenotice')[0].innerHTML+" 刷新页面 返回上一页 "; console.log("Reload and back link created");