Created
November 13, 2014 08:51
-
-
Save user19/36a9233f4b48d4a41927 to your computer and use it in GitHub Desktop.
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 characters
setInterval(function(){ | |
var x = new XMLHttpRequest(); | |
x.onload = function(){ | |
var r = JSON.parse(x.responseText).query.results; | |
if(r !== null) | |
window.location.href = r.a.href; | |
}; | |
x.open("GET","https://query.yahooapis.com/v1/public/yql?q=select * from html where url=\""+window.document.getElementsByClassName("commu_name")[0].href+"\" and xpath=\"//div[@id=\'now_live\']//h2//a\"&format=json&env=store://datatables.org/alltableswithkeys",true); | |
x.send(); | |
},3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment