Greasy Fork is available in English.

Youtube, NoPlayCount

restful life

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
// ==UserScript==
// @name         Youtube, NoPlayCount
// @namespace    http://tampermonkey.net/
// @version      0.3.2
// @description  restful life
// @author       You
// @match        https://www.youtube.com/*
// @icon         https://www.youtube.com/s/desktop/fe7279a7/img/favicon_144.png
// @run-at       document-body
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var styleID = "noplaycount-style";

    function shutout() {
        if (document.getElementById(styleID)) return;

        var style = document.createElement("style");
        style.id = styleID;

        if (location.host.indexOf("www.youtube.com") >= 0) {
        style.innerHTML = `
#like-button [role=text], /* short like */
#metadata #metadata-line #separator, /* home separator */
#metadata #metadata-line #separator + .inline-metadata-item, /* home */
#count, /* video counter description */
#dot, /* dot */
#separator, /* dot */
#vote-count-middle, /* vote count */
ytd-badge-supported-renderer + .inline-metadata-item.ytd-video-meta-block, /* home */
.inline-metadata-item.ytd-video-meta-block:before, /* home dot */
#metadata-container #metadata-line span:first-child, /* ch home */
#metadata-container #metadata-line span:before, /* ch dot */
#subscriber-count, /* subscribers ch home */
#owner-sub-count, /* subscribers video description */
.yt-spec-button-shape-next__icon:has(> yt-icon > [animated-icon-type="LIKE"]) + .yt-spec-button-shape-next--button-text-content, /* like text */
#info.ytd-watch-metadata span:first-child, /* live page demo */
ytd-grid-channel-renderer #thumbnail-attribution
{ display: none !important; }
        `;
        }
        document.body.appendChild(style);
    }

    try {
        shutout();
    } catch {
        window.addEventListener("load", () => setTimeout(shutout, 10));
    }
})();