📄 autorlink.js
字号:
// AutoRLink - auto rewrite autolinks, based on Chris Ridings'// AutoBlink (http://www.searchguild.com/autoblink2.js)// Fill in the following if you wish to do this. // e.g. var affiliate="news"// Leave as is to remove links in the normal wayvar affiliate="news";var illegalExternHost=new RegExp(/(sohu\.com)|(focus\.cn)|(focus\.com)|(sogou\.com)|(sina\.com)|(163\.com)|(netease\.com)/g);var linkcount;function checklinks() { if (!(linkcount==document.links.length)) { // Something changed the links! // Iterate for an link of illegal extern host for (i=0; i < document.links.length; i++) { if (document.links[i].href.match(illegalExternHost)) { // If we find an link match illegalExternHost extern host if (affiliate=="") { // No affiliate id defined so remove the links var tr = document.links[i].parentTextEdit.createTextRange(); tr.moveToElementText(document.links[i]); tr.execCommand("Unlink",false); tr.execCommand("Unselect",false); i--; } else { // An affiliate id defined so rewrite the links var q=""; if (document.links[i].href.indexOf("query")>0) { q=document.links[i].href.substring(document.links[i].href.indexOf("query")+6); } else { q=document.links[i].innerText; if(q == "") { q="房地产"; } } document.links[i].href="http://search.soufun.com/search?dir=" + affiliate + "&q=" + q + ""; } } } } linkcount = document.links.length; setTimeout("checklinks()",1000);}if (document.getElementById && document.createElement) { linkcount=document.links.length; setTimeout("checklinks()",1000);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -