hunterbdm / Remove IQ Clickbait

// ==UserScript==
// @name        Remove IQ Clickbait
// @description This script hides any youtube videos containing " IQ " in the title
// @namespace   Violentmonkey Scripts
// @match       https://www.youtube.com/*
// @grant       none
// @version     1.0
// @author      @hunter_bdm
// @license MIT
// ==/UserScript==

function removeClickbait() {
    let titles = document.querySelectorAll("#video-title")

    for (let i = 0; i < titles.length; i++) {
        if (titles[i].innerText.match(/ IQ /gi)) {
            console.log(titles[i].innerText)
            titles[i].parentElement.parentElement.parentElement.parentElement.parentElement.remove()
        }
    }
}

setInterval(removeClickbait, 500);
removeClickbait()