Last active
November 30, 2022 20:15
-
-
Save winkler1/f390930f4306eb6ca565f5bd675dd460 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
// ==UserScript== | |
// @name No Doohickey | |
// @include https://post.news/* | |
// ==/UserScript== | |
var EVIL = "Can y’all repost this post to let folks know I’m on this dohicky"; | |
var regex = RegExp( EVIL + "\\?","mg"); | |
function makeItStop() { | |
for (let kid of document.getElementsByTagName("p")) { | |
var newHTML = kid.innerHTML; | |
if (newHTML.indexOf(EVIL) > -1) { | |
kid.innerHTML = newHTML.replace(regex, "[CENSORED]"); | |
} | |
} | |
// Low-rent way of dealing with Infinite Scroll | |
setTimeout(makeItStop, 1000); | |
} | |
(function() | |
{ | |
setTimeout(makeItStop, 1000); // Next hydration timing is funky. | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment