Hide played Episodes

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

As of 2023-08-21. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

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)
})();