您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
ニコニコ動画のコメントをデフォルトで非表示にする
// ==UserScript== // @name Turn off Nicomment LS // @namespace https://at.sachi-web.com/turn-off-nicomment-ls.html // @version 1.0.190614 // @description ニコニコ動画のコメントをデフォルトで非表示にする // @author うみのさち // @match https://www.nicovideo.jp/watch/* // @grant none // @noframes // ==/UserScript== ( ()=> { 'use strict'; const interval = 250; const timeover = 10000; const turnoff = { 'html': ()=> { document.getElementsByClassName('CommentOnOffButton')[0].click(); }, 'flash': ()=> { player.ext_setCommentVisible(false); } }; let time = 0; let player = document.getElementById('external_nicoplayer'); let type = player ? 'flash' : 'html'; let timer = setInterval( ()=> { try { time += interval; if( time <= timeover ) turnoff[type](); clearInterval(timer); } catch(e) { // player isn't ready } }, interval); })();