I really like Google’s floating birthday balloons on my avatar, so is there any way to keep the balloons floating on my avatar?
Is it possible to write a Tampermonkey script to accomplish this requirement?
- Google’s birthday balloon: Solved: Local Guides Connect – Happy Birthday Balloons from Google – Local Guides Connect
- Link to static file of the balloon: apd_desktop_dark_2x.gif
let divNav = document.querySelector('div[role="navigation"]')
let btnAccount = undefined, btnArr = divNav.getElementsByTagName("a")
for (let objA of btnArr) {
if (objA.getAttribute("aria-label").includes("account")) {btnAccount = objA; break;}
}
if (btnAccount != undefined) {
let imgEle = document.createElement("img")
imgEle.className = "gb_d"
imgEle.src = "https://ssl.gstatic.com/gb/images/birthday/apd_desktop_dark_2x.gif"
imgEle.style.zIndex = 991
imgEle.style.position = "absolute"
imgEle.style.top = "-4px"
imgEle.style.bottom = "-4px"
imgEle.style.left = "-4px"
imgEle.style.right = "-4px"
btnAccount.parentNode.insertBefore(imgEle, btnAccount);
}
New contributor
Asterisk Azurain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.