Last active
September 28, 2026 03:37
-
-
Save rebane2001/9574768a7cfef8469c5d7c18ae012092 to your computer and use it in GitHub Desktop.
Simple Gmail userscript that restores old yellow icons and hover behaviour
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Restore Yellow Stars | |
| // @namespace rebane2001 | |
| // @icon https://ssl.gstatic.com/ui/v1/icons/mail/gm3/1x/star_fill_googyellow500_20dp.png | |
| // @version 1.0.0 | |
| // | |
| // @match https://mail.google.com/mail/* | |
| // @grant none | |
| // @run-at document-idle | |
| // | |
| // @author rebane2001 | |
| // @description Simple Gmail userscript that restores old yellow icons and hover behaviour. | |
| // ==/UserScript== | |
| function tryPatch() { | |
| const mainStyle = document.querySelector(":root>head>style[data-href]"); | |
| if (!mainStyle) return setTimeout(tryPatch, 100); | |
| mainStyle.textContent = `tr:not(.aqw) { & > .xY > .T-KT, & > .xY > .pG { opacity: 0.7 }}` + mainStyle.textContent; | |
| mainStyle.textContent = mainStyle.textContent.replace(/double_arrow_baseline_p.00_(..dp.png\));?/g, (_, postfix) => "label_important_fill_googyellow500_" + postfix + `;&::after{ | |
| content: ''; | |
| background: url(https://ssl.gstatic.com/ui/v1/icons/mail/skinnable/infooverload_ltr_dark_2x.png) no-repeat -14px -9px; | |
| background-size: 42px 80px; | |
| width: 14px; | |
| height: 10px; | |
| position: absolute; | |
| translate: 4px 4px;}`); | |
| mainStyle.textContent = mainStyle.textContent.replace(/double_arrow_/g, "label_important_"); | |
| mainStyle.textContent = mainStyle.textContent.replace(/((?:label_important|star)_(?:fill_)?)(?:baseline_p.00|googblue.00)/g, (_, prefix) => prefix + "googyellow500"); | |
| } | |
| tryPatch(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you! ❤️