-
-
Save pxeger/4aed4baaa87028a2ecc6441a84a1fbc2 to your computer and use it in GitHub Desktop.
Userscript to auto-hide job adverts on HackerNews
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
// ==UserScript== | |
// @name Remove job adverts from HackerNews | |
// @namespace _.pxeger.com | |
// @version 1.1 | |
// @downloadURL https://gist.githubusercontent.com/pxeger/4aed4baaa87028a2ecc6441a84a1fbc2/raw | |
// @author Patrick Reader <_@pxeger.com> | |
// @grant none | |
// @match *://news.ycombinator.com/* | |
// ==/UserScript== | |
// licence: GPL v3 (https://www.gnu.org/licenses/gpl-3.0.en.html) | |
(() => { | |
if (!document.getElementById("me")) { | |
// not logged in | |
return; | |
} | |
document.querySelectorAll(".athing").forEach(athing => { | |
if (athing.querySelector(".votelinks") === null) { | |
athing.nextSibling.querySelector("a[href^=hide]").click(); | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To install, this userscript, install a UserScript Manager such as ViolentMonkey, then click here