Youtube卡片隐藏

使用css隐藏视频结尾的卡片

Fra 07.09.2020. Se den seneste versjonen.

// ==UserScript==
// @name         Youtube卡片隐藏
// @namespace    httpw://www.youtube.com/
// @version      0.2
// @description  使用css隐藏视频结尾的卡片
// @author       woodj
// @license      MIT
// @include      *://www.youtube.com/watch*
// @icon         https://www.youtube.com/s/desktop/ebcf1b0f/img/favicon.ico
// @require      https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.4.js
// ==/UserScript==

(function () {
    'use strict';
    // 创建 <style> 标签
    var style = document.createElement("style");
    // 对WebKit hack :(
    style.appendChild(document.createTextNode(".ytp-ce-element-show { visibility: hidden; }"));
    // 将 <style> 元素加到页面中
    document.head.appendChild(style);
    setInterval(function() {
        $(".adsbygoogle").css("display", "none");
    }, 500);
})();