Last active
December 11, 2022 00:02
-
-
Save grantwforsythe/d64b09153cb1276e9a8ebdb087bdc372 to your computer and use it in GitHub Desktop.
Remove YouTube's (annoying) clarify box
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 YouTube Clarification | |
// @namespace http://tampermonkey.net/ | |
// @run-at document-idle | |
// @version 0.1 | |
// @description Remove YouTube's (annoying) clarification box | |
// @author Grant Forsythe | |
// @match https://www.youtube.com/watch?v=* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com | |
// @grant none | |
// ==/UserScript== | |
// Time to wait in milliseconds | |
const TIMEOUT_MILLISECONDS = 2000; | |
// Disable the clarify box | |
function disableClarifyBox() { | |
// Find the clarify box | |
const clarifyBox = document.querySelector('#clarify-box'); | |
// Check if the element exists | |
if (clarifyBox) { | |
// Hide the element from the DOM | |
clarifyBox.style.display = 'none'; | |
} | |
} | |
// Wait for the element to appear in the DOM as it is rendered after the fact | |
setTimeout(disableClarifyBox, TIMEOUT_MILLISECONDS); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment