Last active
October 18, 2022 20:50
-
-
Save Oisann/eaa7b76592e62c5f40997809d653c20a to your computer and use it in GitHub Desktop.
Click on the Raw button below and Tampermonkey should automatically pick it up. Just press install.
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 No YT Ambilight | |
// @namespace https://oisann.net/ | |
// @version 0.3 | |
// @description Remove YouTube Cinematics Effect. | |
// @author Oisann | |
// @match https://www.youtube.com/watch* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const attribute = "style"; | |
const style = "display: none"; | |
function removeAmbilight() { | |
const element = document.getElementById('cinematics'); | |
if (element) { | |
if (element.getAttribute(attribute) !== style) { | |
element.setAttribute(attribute, style); | |
} | |
} | |
window.requestAnimationFrame(removeAmbilight); | |
} | |
window.requestAnimationFrame(removeAmbilight); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment