YouTube i powtarzające się powiadomienia, dlaczego? Można tz tym coś zrobić?

Jak w temacie.

Dlaczego w obszarze powiadomień na YT się powielają? Tzn. jeśli scrolluję w dół, widzę powiadomienie X, to dalej znów to samo, cofa się ta lista. :smiley:
Nie ma tak: 1 dzień temu, 2, 3, 4, 5 itd. tylko niższe powiadomienia odwołują się do późniejszych…

Ktoś coś?
Mam taki CSS do Stylusa, wygenerowany przez ChatGPT:

/* ==UserStyle==
@name YouTube – Bez separatorów powiadomień
@namespace OpenAI · GitHub
@version 1.0.0
@description Usuwa podziałki/separatory w powiadomieniach YouTube
@author Ty :slight_smile:
==/UserStyle== /
@-moz-document domain(„youtube.com”) {
/
Ukrywa podziałki (separatory) w powiadomieniach YouTube /
ytd-notification-renderer #divider,
ytd-notification-renderer tp-yt-paper-divider,
ytd-notification-renderer ytd-item-section-header-renderer {
display: none !important;
height: 0 !important;
margin: 0 !important;
padding: 0 !important;
}
/
(opcjonalnie) Zmniejszenie odstępów między powiadomieniami */
ytd-notification-renderer {
margin: 4px 0 !important;
padding: 6px !important;
}
}

Git będzie? U mnie nie działa…

Prędzej musiałby być to skrypt do Tampermonkey (lub innej małpy/kota przepisanej na Manifest V3), który porówna URL/nazwę (nawet CSS4 tego nie oferuje, bo nie znamy URL do użycia „div:has(~ div a[href*="wideo"]):has(> * a[href*="wideo"])”).

Pewnie do dalszych poprawek/optymalizacji (do Tampermonkey nie Stylusa):

// ==UserScript==
// @name         Hide Duplicated Notifications on YouTube
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Hide duplicated notifications on YouTube when URL is unknown
// @author       You
// @match        https://www.youtube.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Function to check if the notification is a duplicate
    function isDuplicate(notification, seenNotifications) {
        const notificationText = notification.textContent.trim();
        return seenNotifications.has(notificationText);
    }

    // Function to hide duplicates
    function hideDuplicatedNotifications() {
        const notificationList = document.querySelectorAll('ytd-compact-video-renderer, ytd-notification-renderer');
        const seenNotifications = new Set();

        notificationList.forEach(notification => {
            if (isDuplicate(notification, seenNotifications)) {
                notification.style.display = 'none'; // Hide duplicate
            } else {
                seenNotifications.add(notification.textContent.trim()); // Mark this notification as seen
            }
        });
    }

    // Run the function periodically to check for new notifications
    setInterval(hideDuplicatedNotifications, 2000); // Every 2 seconds

})();

inna wersja, gdy film ma to samo „ID” — nie jest to jakiś reupload (a bardziej powiadomienie po premierze dla plebsu, gdy ty jesteś płatnym patronem):

// ==UserScript==
// @name         Hide Duplicated Notifications on YouTube (Stable URL)
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Hide duplicated notifications on YouTube when URL is known and stable
// @author       You
// @match        https://www.youtube.com/
// @match        https://www.youtube.com/watch*
// @match        https://www.youtube.com/feed/subscriptions
// @match        https://www.youtube.com/channel/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Function to check if the notification is a duplicate
    function isDuplicate(notification, seenNotifications) {
        const notificationText = notification.textContent.trim();
        return seenNotifications.has(notificationText);
    }

    // Function to hide duplicates
    function hideDuplicatedNotifications() {
        const notificationList = document.querySelectorAll('ytd-compact-video-renderer, ytd-notification-renderer');
        const seenNotifications = new Set();

        notificationList.forEach(notification => {
            if (isDuplicate(notification, seenNotifications)) {
                notification.style.display = 'none'; // Hide duplicate
            } else {
                seenNotifications.add(notification.textContent.trim()); // Mark this notification as seen
            }
        });
    }

    // Run the function periodically to check for new notifications
    setInterval(hideDuplicatedNotifications, 2000); // Every 2 seconds

})();

Może wyższe są na temat ripost do twojego komentarza pod filmem.

No, ale rozumiecie, o co mi chodzi?? SS to tylko przykładowy…

Z góry przewijasz w dół, masz powiadomienie X. Sctoll’ujesz w dół niżej i znów to samo. :open_mouth: ?? Tak było??