Skip to content

Instantly share code, notes, and snippets.

@AgentLoneStar007
Last active March 11, 2024 10:53
Show Gist options
  • Save AgentLoneStar007/0a862844cbd2860bfa7cb5c30cbe5bcd to your computer and use it in GitHub Desktop.
Save AgentLoneStar007/0a862844cbd2860bfa7cb5c30cbe5bcd to your computer and use it in GitHub Desktop.
Gigatube.js: A userscript that removes the Youtube doodle and replaces it with something way better.
// ==UserScript==
// @name Gigatube (Youtube Doodle Remover)
// @version 1.1
// @description Replaces the Youtube logo and any Youtube/Google doodles with a different image.
// @author AgentLoneStar007, with a ton of help from u/FlowerForWar.
// @match *://www.youtube.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
const newImage = 'https://i.imgur.com/YVxABmv.png';
function callback(_, observer) {
const yoodle = document.querySelector('.ytd-yoodle-renderer');
if (yoodle) {
console.log(yoodle);
yoodle.outerHTML = `<img src="${newImage}">`;
observer.disconnect();
}
const logo = document.querySelector('.ytd-logo');
if (logo) {
console.log(logo);
logo.outerHTML = `<img src="${newImage}">`;
observer.disconnect();
}
}
new MutationObserver(callback).observe(document, {
childList: !0,
subtree: !0,
});
@Ashton8888
Copy link

gid:pr6UZ9MUuLu67VvRjzodkR

@AgentLoneStar007
Copy link
Author

Updated script to fix an issue where the new logo wouldn't appear if there was a Youtube doodle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment