Hide played Episodes

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

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

Advertisement:

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

Advertisement:

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name        Hide played Episodes
// @namespace   Violentmonkey Scripts
// @match       https://podcasts.google.com/*
// @grant       none
// @version     1.0.1
// @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)
})();