Created
April 23, 2011 02:20
-
-
Save binux/938176 to your computer and use it in GitHub Desktop.
Revisions
-
足兆叉虫 revised this gist
May 18, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ // @include http://bbs.byr.cn/* // @include http://bbs6.byr.cn/* // @include http://www.newsmth.net/* // @version 1.5 // @author Binux // ==/UserScript== -
足兆叉虫 revised this gist
May 18, 2012 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,16 +33,16 @@ function onLoad(event) { } function sendRequest(ip){ setTimeout(function() {GM_xmlhttpRequest({ method: 'GET', url: 'http://www.youdao.com/smartresult-xml/search.s?type=ip&q='+ip, onload: function(responseDetails) { var response = responseDetails.responseText; var ip = response.match(/<ip>(.*)<\/ip>/)[1]; var loc = response.match(/<location>(.*)<\/location>/)[1]; showAddress({'ip': ip,'loc': loc}); } })}, 0); } function showAddress(response){ -
binux revised this gist
Dec 5, 2011 . 1 changed file with 3 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ // @include http://bbs.byr.cn/* // @include http://bbs6.byr.cn/* // @include http://www.newsmth.net/* // @version 1.4 // @author Binux // ==/UserScript== @@ -52,16 +52,7 @@ function showAddress(response){ } } onLoad(); window.addEventListener("load", onLoad, false); window.addEventListener("AutoPagerAfterInsert", onLoad, false); document.addEventListener("DOMNodeInserted", onLoad, false); -
binux revised this gist
Oct 10, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ // @include http://bbs.byr.cn/* // @include http://bbs6.byr.cn/* // @include http://www.newsmth.net/* // @version 1.3.1 // @author Binux // ==/UserScript== -
binux revised this gist
Oct 10, 2011 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,6 +61,7 @@ function checkDom() { setTimeout("checkDom()", 500); } onLoad(); setTimeout("checkDom()", 500); window.addEventListener("load", onLoad, false); window.addEventListener("AutoPagerAfterInsert", onLoad, false); -
binux revised this gist
Oct 10, 2011 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -52,7 +52,7 @@ function showAddress(response){ } } var IP2LOC_DOCUMENT_HIGHT = document.height; function checkDom() { if (IP2LOC_DOCUMENT_HIGHT != document.height ) { IP2LOC_DOCUMENT_HIGHT = document.height; @@ -61,4 +61,6 @@ function checkDom() { setTimeout("checkDom()", 500); } window.addEventListener("load", onLoad, false); window.addEventListener("AutoPagerAfterInsert", onLoad, false); setTimeout("checkDom()", 500); -
binux revised this gist
Sep 9, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ // @include http://bbs6.byr.edu.cn/* // @include http://bbs.byr.cn/* // @include http://bbs6.byr.cn/* // @include http://www.newsmth.net/* // @version 1.3 // @author Binux // ==/UserScript== -
binux revised this gist
Sep 9, 2011 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,6 +8,7 @@ // @include http://bbs6.byr.edu.cn/* // @include http://bbs.byr.cn/* // @include http://bbs6.byr.cn/* // @include http://*.newsmth.net/* // @version 1.3 // @author Binux // ==/UserScript== -
binux renamed this gist
Apr 23, 2011 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
binux created this gist
Apr 23, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,63 @@ // ==UserScript== // @name BYR BBS ip2location // @namespace http://bbs.byr.cn/ // @description 使北邮人论坛用户发贴IP地址后附加物理地址信息 // @include http://forum.byr.edu.cn/* // @include http://forum.byr.cn/* // @include http://bbs.byr.edu.cn/* // @include http://bbs6.byr.edu.cn/* // @include http://bbs.byr.cn/* // @include http://bbs6.byr.cn/* // @version 1.3 // @author Binux // ==/UserScript== function onLoad(event) { var fonts = document.getElementsByTagName("font"); for ( var i = 0,font;font = fonts[i];i++ ) { var result = font.innerHTML.match(/\[FROM:\D{0,5}(\d+\.\d+\.\d+\.[0-9*]+)\]/); if(result && font.lastChild.nodeName != "SPAN") { var ip = result[1].replace("*","0"); var span = document.createElement("span"); span.innerHTML = " [ LOADING... ]"; span.className = ip; font.appendChild(span); sendRequest(ip) } } } function sendRequest(ip){ GM_xmlhttpRequest({ method: 'GET', url: 'http://www.youdao.com/smartresult-xml/search.s?type=ip&q='+ip, onload: function(responseDetails) { var response = responseDetails.responseText; var ip = response.match(/<ip>(.*)<\/ip>/)[1]; var loc = response.match(/<location>(.*)<\/location>/)[1]; showAddress({'ip': ip,'loc': loc}); } }); } function showAddress(response){ var spans = document.getElementsByClassName(response.ip); for(var i=0,span;span = spans[i];i++){ span.innerHTML = " [" + response.loc + "] "; } } var IP2LOC_DOCUMENT_HIGHT = 0; function checkDom() { if (IP2LOC_DOCUMENT_HIGHT != document.height ) { IP2LOC_DOCUMENT_HIGHT = document.height; onLoad(); } setTimeout("checkDom()", 500); } window.addEventListener("load", checkDom, false);