Is there a way to disable the numbered notification on open tabs?
-
75338a last edited by
Many websites incl. this forum put a little number on the tab when you have unread notifications. I would like to disable this, specifically for Discord. Nothing on the Discord settings seem to work, incl. "mute all notifications" etc.
There does not appear to be an Opera or Chrome extension to do this. Help? Is there maybe a flag setting for it?
See previous post at https://forums.opera.com/topic/30663/permanently-remove-alert-number-from-tab-bar and see image below.
-
burnout426 Volunteer last edited by
https://stackoverflow.com/questions/65719387/browser-tab-badge-notification shows how it's done. The page uses Javascript to modify the <link> element in the page that specifies the favicon (https://forums.opera.com/favicon.ico in this case for this page here) for the page/tab. The page changes the favicon to one that has the unread count on it.
You might be able to use Violent Monkey to block the changing of the favicon like this forums.opera.com example:
// ==UserScript== // @name New script - opera.com // @namespace Violentmonkey Scripts // @match https://forums.opera.com/* // @grant none // @version 1.0 // @author - // ==/UserScript== console.log("Favicon Change Blocker Script Activated"); var originalhref = HTMLLinkElement.prototype.__lookupSetter__("href"); HTMLLinkElement.prototype.__defineSetter__("href", function(val) { if (this.rel === "icon" && this.type === "image/x-icon") { console.log("Favicon change blocked! (href property)"); console.log(this); console.log(val); return; } originalhref.call(this, val); }); /* var originalSetAttribute = HTMLLinkElement.prototype.setAttribute; HTMLLinkElement.prototype.setAttribute = function(name, val) { if (this.rel === "icon" && this.type === "image/x-icon" && name.toLowerCase() === "href") { console.log("Favicon change blocked! (setAttribute() function)"); console.log(this); console.log(val); return; } originalSetAttribute.call(this, name, val); };*/
Test it on this site and watch the console (ctrl + shift + j) to see the image/png data URL the page tries to set for the favicon.
I didn't test the script a lot, so you'll have to test it (on Discord for example) and make sure it doesn't break anything.
-
burnout426 Volunteer last edited by
Besides working around the issue yourself, it would be up to the site to offer an option to control it. Not sure if Discord has that in the settings on the site or not.
-
75338a last edited by
@burnout426 Thank you very much. Discord indeed does not have a setting to stop this.