Skip to content

Instantly share code, notes, and snippets.

@xeechou
Created December 6, 2022 01:35
Show Gist options
  • Save xeechou/6278772e48fdd4d0fabf24cd395adef2 to your computer and use it in GitHub Desktop.
Save xeechou/6278772e48fdd4d0fabf24cd395adef2 to your computer and use it in GitHub Desktop.
Grease Monkey Script to Block youtube playlist
// ==UserScript==
// @namespace https://xeechou.net/gmscripts
// @name Blocking youtube play list
// @version 1
// @grant GM_addStyle
// @include https://www.youtube.com/*
// ==/UserScript==
function GM_addStyle(css) {
const style = document.getElementById("GM_addStyleBy8626") || (function() {
const style = document.createElement('style');
style.type = 'text/css';
style.id = "GM_addStyleBy8626";
document.head.appendChild(style);
return style;
})();
const sheet = style.sheet;
sheet.insertRule(css, (sheet.rules || sheet.cssRules || []).length);
}
GM_addStyle("#secondary {display:none}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment