2022-10-25 19:39:14 +02:00
|
|
|
// ==UserScript==
|
2023-01-11 18:59:18 +01:00
|
|
|
// @name Keyword based thread hider
|
2022-10-25 19:39:14 +02:00
|
|
|
// @namespace Violentmonkey Scripts
|
|
|
|
// @match *://boards.4channel.org/*/catalog
|
2022-11-07 00:00:48 +01:00
|
|
|
// @match *://boards.4chan.org/*/catalog
|
2022-10-25 19:39:14 +02:00
|
|
|
// @version 1.0
|
|
|
|
// ==/UserScript==
|
|
|
|
|
|
|
|
window.addEventListener("load", function () {
|
2022-12-09 02:42:45 +01:00
|
|
|
const keywords = [] // e.g. ["/sdg/", "luke smith"]
|
|
|
|
const data = document.getElementsByClassName("teaser")
|
2022-10-25 19:39:14 +02:00
|
|
|
|
2022-12-09 02:42:45 +01:00
|
|
|
for (let i = 0; i < data.length; ++i) {
|
|
|
|
let inner_txt = data[i].innerText
|
|
|
|
for (let j = 0; j < keywords.length; ++j) {
|
2022-12-12 06:36:02 +01:00
|
|
|
if (inner_txt.includes(keywords[j]) && data[i].offsetParent !== null) {
|
2022-12-09 02:42:45 +01:00
|
|
|
data[i].offsetParent.style.display = "none"
|
|
|
|
}
|
2022-10-25 19:39:14 +02:00
|
|
|
}
|
2022-12-09 02:42:45 +01:00
|
|
|
}
|
2022-10-25 19:39:14 +02:00
|
|
|
})
|