Skip to content

Instantly share code, notes, and snippets.

@Oisann
Last active October 18, 2022 20:50
Show Gist options
  • Save Oisann/eaa7b76592e62c5f40997809d653c20a to your computer and use it in GitHub Desktop.
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.
// ==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