Last active
June 9, 2024 17:38
-
-
Save TChilderhose/13e2850fba410bb162233f4ad5141bb6 to your computer and use it in GitHub Desktop.
ProtonMail Unread Message Count in Favicon
This file contains 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 ProtonMail Unread Message Count in Favicon | |
// @version 2022.09.29 | |
// @author Tyler Childerhose | |
// @match https://mail.proton.me/* | |
// @run-at document-end | |
// @grant none | |
// ==/UserScript== | |
//Based on https://userscripts-mirror.org/scripts/show/39432 | |
const ICONS = [ // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20+, 50+, 99+, | |
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGrSURBVDhPpZNNSFVBFMd/M/d9aFD2UkktKFwIwsPgmbkJJAhJEaLFw4W0aFMEGaEb3QsRiAtpUSuxlQtXLhJU0E2ChAgtrBSjwHQRWRpBqO+dzr1zfSI98kY/OJyZ8/Gf4QzD/2KG++XN3h4zvYOmJ4xFYuC+DCUTXDfjz0SshW9feGtXyNwZNb/CmqJks+I1VfPqdAXNsRjYfA5KTsC5WupLL7Mx2Cd1Ye0fPGqVM2d/8rK8iuZEEuJqdmEadr47kZqLpC5lWB55IrfDngIPb0jDvsdrA63xhGv2vd3dhflJ+LDsRFKVeOkmXow9ledhLw/apDNvmTeGWn8fCIRmuttFgiqlPgNX2yGmCfSoz2uszk2wtLNF1kUcLTfB85wdEfA5r2e0dWlCk1Nj8PEdpK/AtVuQLHU1p1KQ29fc+yICxeh+7Jov1BUuwfZXIacPoA94PAfNn1YksO0toazcEItHFLAmH64cOsyCjySQl6NlBQENWx3AuttGx2/00emptHD3X0UObqBfYPNwrH9BRGbVnTTGNLpIE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AAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAKjSURBVDhPpVJtSFNRGH7u2ZzORtNr0oc0Yn3gpqQNTaNArCHNLKlmBiWVIs5MqaxIgoyIQDDB8of+KYqggvlDMSsMkkJJTAVzKz+JKC1W05nh907nnnsNQX8EPfDec+97nuc57/uei/+FcLuEds/O4mVxuXBeyf0TbuTTikANrIKzmlJCgFEPPpA+WE7dF6YUzrLIyKCq+LVoCVmFBLUaIP55ICgYiDDCpI3DcPllukXhLsHZFCqu/o3GsDVI0AQCASxIWxMwPiabrNuA0BgL3PfKaJai+YuivXTrnArtApASoJHF0kpmZoDWZ8CQWzYJDYcqOh4PHlfRGkWLMzaa6SdoFQQYpW9uoIRQmEopZzGYLMCuVEDNNsCO+jqI/uZ6dI17kSFnZCSlAyqVHELNNUqTDwKBWnlT6k0vshdGZ0JMLzPSlaHA/BzwqZe1sCBufFGLzVFBqLxTBs8I4BkGOjq7cKX0NK5eL4Tnx3dFzrzZrUnlG83MQBL39vXgbVsz+l1TEMVwVFSWcuKBw9uRl3MBmfYc7Egy8JyEc8UOsHlAHcAMiOBH43MnDOv5fBg5G1XVNzEw+BGbNppgMBgRZY7FofQs+HyjnONyd/MquImfElh370dR8THEWXairf01zKZYJo7klT1l5l6vB0+cd7EiWMda+YaBgT6czD7KzYQvQ3SaDUTT4+7Cm5YmTurobEXlrYcYG/OiruERtNpgXCzJRnf7Ty7KLUhDrbMB1A9K2C/5WaXGTLR5G/JzL/Ey9ySncWJIiIgTxwtgiozBPtsR6Nn1SCGBrVQME0dAKX01OTnZYbfbPYQQ6nA4RljunRRWq3XUZrN5ExMTx10u1/uF/KKoF9hDOi7P5/NF6PV6P7dfhImJCaLT6ZbkGX4BqPgDy4r+JpaQEugAAAAASUVORK5CYII=' | |
]; | |
const HEAD = top.document.getElementsByTagName("head")[0]; | |
let lastCount = -1; | |
function updateCount() { | |
let matches = document.title.match(/^\((\d+)\)/); | |
let count = matches ? parseInt(matches[1], 10) : 0; | |
if (lastCount !== count) { | |
lastCount = count; | |
let index = count; | |
if (count > 98) { | |
index = 22; // "99+" | |
} else if (count > 49) { | |
index = 21; // "50+" | |
} else if (count > 19) { | |
index = 20; // "20+" | |
} | |
//Set Icon | |
const links = HEAD.getElementsByTagName('link'); | |
for (let i = 0; i < links.length; i++) { | |
if (links[i].rel.endsWith('icon')) { | |
links[i].type = "image/png"; | |
links[i].href = ICONS[index]; | |
} | |
} | |
} | |
} | |
// Checks every second for a change in the unread count. | |
setInterval(() => { | |
updateCount(); | |
}, 1000); |
I have just tried in Windows 11. Again it works in Firefox but not in Vivaldi.A pity, I prefer Vivaldi and I find this functionality very useful. Can it be fixed?
I don't use Vivaldi but had an issue come up in a different browser that sounds similar. Can you try the updated js and let me know.
Bingo! That does it. Thank you, Tyler. Very much appreciated.
Brian.
…------- Original Message -------
On Thursday, September 29th, 2022 at 12:56, Tyler Childerhose ***@***.***> wrote:
@TChilderhose commented on this gist.
---------------------------------------------------------------
I don't use Vivaldi but had an issue come up in a different browser that sounds similar. Can you try the updated js and let me know.
—
Reply to this email directly, [view it on GitHub](https://gist.github.com/13e2850fba410bb162233f4ad5141bb6#gistcomment-4319372), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AGY5KJSQVWNBRCC6B46KPULWAVYV5ANCNFSM6AAAAAAQJH7PIY).
You are receiving this because you commented.Message ID: ***@***.***>
👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Useful script, thank you. It works fine for me in Firefox 104 Linux Mint but does not work at all in Vivaldi 5.4 Linux Mint. Any ideas why?