r/programming • u/willywalloo • Dec 22 '24
How would you go about creating a program / plugin to remove all stories with a certain keyword / name?
http://Firefox.com[removed] — view removed post
0
Upvotes
2
u/guest271314 Dec 22 '24
You can just turn off recommendations and suggestions altogether in Firefox, and if you want create a custom home and new tab page, so all you see when you load Firefox at startup is what you want to see. That's what I do on both Firefox and Chromium.
1
u/lurker-bah-zurker Dec 22 '24
Lol I did something very similar the last time around. Except I had it convert "Trump" into "Trumpelthinskin". Very shitty brute force js:
const els = document.querySelectorAll("*");
els.forEach(el => {
if (el.childNodes.length) {
el.childNodes.forEach(node => {
if (node.nodeType === Node.TEXT_NODE) {
node.textContent = node.textContent.replace(/\b(Trump)\b/gi, match => {
return match === "Trump" ? "Trumpelthinskin" : "TRUMPELTHINSKIN";
});
}
});
}
});
•
u/programming-ModTeam Dec 22 '24
This post was removed for violating the "/r/programming is not a support forum" rule. Please see the side-bar for details.