Enhance titles - YouTube

Hide watched videos on YouTube

目前为 2019-10-05 提交的版本。查看 最新版本

// Enhance titles - YouTube
// Hide watched videos on YouTube
//
// https://gf.qytechs.cn/scripts/390633-enhance-titles-youtube
// Copyright (C) 2019, Guido Villa
//
// For instructions, see https://gf.qytechs.cn/help/installing-user-scripts
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name            Enhance titles - YouTube
// @description     Hide watched videos on YouTube
// @version         1.2
// @author          guidovilla
// @date            03.10.2019
// @copyright       2019, Guido Villa (https://gf.qytechs.cn/users/373199-guido-villa)
// @license         GPL-3.0-or-later
// @homepageURL     https://gf.qytechs.cn/scripts/390633-enhance-titles-youtube
// @supportURL      https://gitlab.com/gv-browser/userscripts/issues
// @contributionURL https://tinyurl.com/gv-donate-72
//
// @namespace       https://gf.qytechs.cn/users/373199-guido-villa
//
// @match           https://www.youtube.com/*
//
// @require         https://gf.qytechs.cn/scripts/390248-entrylist/code/EntryList.js
// @grant           GM_xmlHttpRequest
// @grant           GM_getValue
// @grant           GM_setValue
// @grant           GM_deleteValue
// @grant           GM_listValues
// @grant           GM_addStyle
// ==/UserScript==
//
// --------------------------------------------------------------------
//
// To-do (priority: [H]igh, [M]edium, [L]ow):
//   - [L] hide selective titles?
//
// Changelog:
// ----------
// 2019.10.03  [1.2] Refactor using EntryList library
// 2019.09.30  [1.1] First public version, correct @namespace and other headers
// 2019.06.17  [1.0] First version
//

/* global EL: readonly */

(function() {
    'use strict';

    /* BEGIN CONTEXT DEFINITION */

    var dest = EL.newContext('YouTube');


    dest.getPageEntries = function() {
        return document.querySelectorAll('a#thumbnail');
    }


    dest.determineType = function(_I_lists, _I_tt, entry) {
        var st = entry.querySelector('#overlays');
        if (!st.innerHTML) return false;

        st = st.querySelector('#progress');
        return (st && st.style.width == "100%");
    }


    dest.processItem = function(entry, _I_tt, _I_processingType) {
        entry.style.opacity = .1;
    }

    /* END CONTEXT DEFINITION */



    //-------- "main" --------
    EL.startup(dest);

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址