您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes the YouTube comments section
- // ==UserScript==
- // @name Remove YouTube Comments Section
- // @namespace !rcs!
- // @version 4.0
- // @description Removes the YouTube comments section
- // @author Me
- // @include *://*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- // Your code here...
- //@match and @include don't work. maybe it's browser specific. screw it.
- if(window.location.origin.includes("youtube")) {
- var msg = "Comments are hidden by the extension 'Remove Comments Section'"
- function remove() {
- if(document.getElementById("comments") !== undefined && document.getElementById("comments") !== null) {
- if(document.getElementById("comments").innerHTML != msg)
- document.getElementById("comments").innerHTML = msg
- }
- }
- remove()
- //YouTube might be slow...
- window.setInterval(remove,500)
- }
- })();