youtube icon indicating copy to clipboard operation
youtube copied to clipboard

Option to remove unread notification(s) counter in title.

Open danielfaust opened this issue 3 years ago • 5 comments

PROBLEM: When bookmarking videos while there are unread notifications, the bookmark title will contain the number of unread notifications in parentheses. For example: "(2) Mini Raspberry Pi Server With Built In UPS & Stats Display" where "(2)" is the amount of unread notifications. I never care about the "(x)" in the tab's title and wouldn't mind if this just gets removed.

SOLUTION: Add an option to disable (remove) the display of the unread messages count in the window.document.title variable.

ALTERNATIVES: Create a Tampermonkey script.

RELEVANCE / SCOPE: No idea, Important for me, since it pollutes my bookmarks.

"SIDE EFFECTS": None.

danielfaust avatar Aug 31 '21 15:08 danielfaust

hi @danielfaust ! :) this need not specifically/only apply to Youtube and could be called "out of scope" here, because alternatively/more accurately it can be a feature of a bookmarks manager only, to clean titles (such as removing the temporary notification/message counters from all sites)

Yet we also care about that. You might enjoy trying our demo for a history(&bookmarks) manager https://github.com/code4charity/History-Manager (requires to download from github, unzip, and go to chrome://extensions)

Curious/survey: How many bookmarks have you collected since how many years/decades?

ImprovedTube avatar Sep 02 '21 00:09 ImprovedTube

I have around 135000 bookmarks (since 15+, maybe 20 years) but almost half of them are in an old, unused Firefox, the other half mostly in a custom bookmarking system in a database and some, which I use day to day, in Chrome (ie for coding or quick access to news sites).

I understand that this could be handled by a history and bookmarks manager, but if this should be something more generalized, it would need to end up being something like Tampermonkey, where the user can then add their own regex replacement rules and possibly share them online for subscription, also so that it gets synced across devices.

While this may seem out of scope here, this extension is the "swiss army knife" for YouTube in the browser, so it would be nice to have that feature integrated in it. But I can understand if it does not seem to be worth the effort, specially considering that these notifications get updated in realtime, which possibly would require a repeated polling of the title (and nobody likes polling...).

danielfaust avatar Sep 02 '21 07:09 danielfaust

questions?

mrsangjunboon2018 avatar Sep 12 '21 11:09 mrsangjunboon2018

Hi @danielfaust, I'd want this feature, but as a standalone extension so that it can apply to all websites; social media is especially annoying in this regard. So if you or someone else is thinking about writing a Firefox add-on for this, please do, I'd use it.

nekohayo avatar Jan 07 '22 20:01 nekohayo

@nekohayo I'm using the following Tampermonkey script:

// ==UserScript==
// @name         YouTube: Remove Notification Count
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Remove unread Notification count
// @author       You
// @match        https://www.youtube.com/*
// @icon         https://www.youtube.com/s/desktop/fe7279a7/img/favicon_144.png
// @run-at       document-body
// @grant        none
// @nowrap
// ==/UserScript==

(function() {
    'use strict';
    function clean_title() {
        document.title = document.title.replace(/^\(\d+\)\ /, '');
    }
    window.addEventListener("load", () => setInterval(clean_title, 1000));
    clean_title();
})();

danielfaust avatar Jan 08 '22 06:01 danielfaust