Greasy Fork 还支持 简体中文。

Hide played Episodes

This script modifies the display of played podcast links and the adjacent separator elements.

Από την 21/08/2023. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

Advertisement:

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

Advertisement:

// ==UserScript==
// @name        Hide played Episodes
// @namespace   Violentmonkey Scripts
// @match       https://podcasts.google.com/u/1/feed/*
// @grant       none
// @version     1.0
// @author      Alehaaa
// @license     MIT
// @description This script modifies the display of played podcast links and the adjacent separator elements.
// ==/UserScript==

(function() {
    'use strict';

    // Delay execution for a short period (in milliseconds) to allow the page to settle
    setTimeout(function() {
        // Select all <a> elements with the specified href
        const feedLinks = document.querySelectorAll('a[href^="./feed/"]');

        // Loop through each feed link
        feedLinks.forEach(link => {
            // Check if the link's content contains the comment <!-- Draw the green tick. -->
            if (link.innerHTML.includes("<!-- Draw the green tick. -->")) {
                // Set the opacity of the <a> element and its next sibling <div> to 50%
                link.style.display = "none";
                const siblingDiv = link.nextElementSibling;
                if (siblingDiv && siblingDiv.classList.contains("GdsSec")) {
                    siblingDiv.style.display = "none";
                }
            }
        });
    }, 1000); // Delay for 1 second (adjust as needed)
})();