-
-
Save kevinvle/4df8b555900f0004b453 to your computer and use it in GitHub Desktop.
Probably automatically gets you into Google Foobar. Probably.
This file contains 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
// to be run on https://docs.python.org/3.5/reference/ | |
// (probably works on other versions of the docs) (probably) | |
var topics = []; | |
var links = document.getElementsByTagName("a"); | |
for (var i in links) { | |
if (links.hasOwnProperty(i)) { | |
var link = links[i]; | |
var text = link.innerText; | |
if (typeof text === 'string') { | |
var matches = text.match(/\d+\.\d+\. (The )?(.+)/); | |
if (matches !== null) { | |
topics.push('python ' + matches[2].toLowerCase()); | |
} | |
} | |
} | |
} | |
setInterval(function () { | |
var encoded = encodeURIComponent(topics[0]); | |
var url = 'https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=' + encoded; | |
var a = document.createElement("a"); | |
a.target = "_blank"; | |
a.href = url; | |
a.click(); | |
topics.shift(); | |
}, 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment