code-charity / History-Manager

Be smarter & faster. Chrome deletes history after 90 days. Brains don't start from zero over and over again. ('Senile storage' is a paradox (Storage is to reduce forgetting, not promote it. Just like we also avoid Alzheimers & Snapchat)
9 stars 0 forks source link

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

Open danielfaust opened 2 years ago

danielfaust commented 2 years ago

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.

ImprovedTube commented 2 years ago

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?

danielfaust commented 2 years ago

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...).

mrsangjunboon2018 commented 2 years ago

questions?

nekohayo commented 2 years ago

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.

danielfaust commented 2 years ago

@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();
})();
ImprovedTube commented 1 year ago

sorry i missed out on this thread. ~150000 Bookmarks must be a clear sign you should speak fluent regex (among other)

ImprovedTube commented 1 year ago

@danielfaust hi!