Skip to content

Instantly share code, notes, and snippets.

@SJongeJongeJonge
Last active September 20, 2020 22:07
Show Gist options
  • Save SJongeJongeJonge/b23c24d8289ca0a9d5a1194e8445e4f3 to your computer and use it in GitHub Desktop.
Save SJongeJongeJonge/b23c24d8289ca0a9d5a1194e8445e4f3 to your computer and use it in GitHub Desktop.
YouTube thumbnail blur userscript
// ==UserScript==
// @name YouTube Thumbnail Blur
// @namespace YouTube Scripts
// @match https://www.youtube.com/*
// @grant none
// @version 1.1
// @author SJongeJongeJonge
// @description 21-9-2020 00:05:32 Blurs thumbnails on the youtube homepage.
// ==/UserScript==
const css = `
ytd-rich-item-renderer img {
filter: blur(18px)
}
ytd-rich-item-renderer:hover img {
filter: none
}
`;
function addCss() {
const style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
document.getElementsByTagName('head')[0].appendChild(style);
}
if (window.document)
addCss();
else
window.addEventListener('DOMContentLoaded', addCss);
window.addEventListener('yt-page-type-changed', addCss);
// Compacte thumbnails, gerelateerde video's enz.
// ytd-compact-video-renderer img {
// filter: blur(8px)
// }
// ytd-compact-video-renderer:hover img {
// filter: none
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment