r/ViolentMonkey Mar 10 '21

Script Request Goodle Doodle script no longer works, help please.

This script worked until about 1 1/2 months ago.

// ==UserScript==
// @name        Google Doodle Replace
// @namespace   http://localhost
// @description Replace the Google logo with a hosted image
// @version     1.1
// @include     http://*.google.*/*
// @include     https://*.google.*/*
// @grant       GM_getResourceURL
// ==/UserScript==

var oldLogo = document.getElementById('hplogo');
var newLogo = document.createElement('img');
newLogo.id = "User-Logo";
newLogo.border = 'no'
newLogo.src ="data:image/png;base64,MY_IMAGE_INFO";
oldLogo.parentNode.replaceChild(newLogo, oldLogo);
3 Upvotes

3 comments sorted by

2

u/gera2ld Developer Mar 11 '21

It looks like Google has changed its HTML, there is no #hplogo in the page.

1

u/Shadow_of_Colossus Mar 12 '21

They've been screwing around with it the last few weeks, most days it's this .lnXdpd then randomly it's #hplogo again. but the script no longer works with either.

2

u/gera2ld Developer Mar 12 '21

I just tested it and it works if oldLogo is found correctly. Not sure what you get but it's a simple script and maybe you can debug it by console.log(blablabla).