您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
無色透明祭のサムネイル,再生数,コメ数,マイリス数をマスクします
当前为
// ==UserScript== // @name 無色透明祭用マスク // @namespace https://site.nicovideo.jp/mushokutomeisai // @version 0.2 // @description 無色透明祭のサムネイル,再生数,コメ数,マイリス数をマスクします // @author - // @match https://www.nicovideo.jp/watch/* // @match https://ch.nicovideo.jp/mushokutomeisai // @match https://www.nicovideo.jp/user/124082477/mylist/* // @icon https://www.google.com/s2/favicons?sz=64&domain=nicovideo.jp // @grant none // @license CC0 // @run-at document-start // ==/UserScript== (function() { 'use strict'; const addStyle = css => { const style = document.createElement('STYLE'); style.textContent = css; document.head.appendChild(style); }; const mask = (target, color) => { addStyle(` ${target} { color: ${color}; background: ${color}; transition: .2s .2s } ${target}:hover { color: unset; background: unset; transition: 10s 2s } `); }; const modPlayPage = () => { const caption = document.getElementsByClassName('VideoDescription-html')[0]; if (!caption || caption.textContent != '【無色透名祭】参加作品です。https://site.nicovideo.jp/mushokutomeisai/') { return; } const target = ':is(.VideoViewCountMeta-counter, .CommentCountMeta-counter, .MylistCountMeta-counter) .FormattedNumber'; mask(target, '#657586'); addStyle(`${target} { display: inline-block; width: 5rem; overflow: hidden; }`); }; const modChannelPage = () => { mask('.g-video_counts', '#6296c1'); addStyle(` .thumb_anchor::before { background: #222 url('https://secure-dcdn.cdn.nimg.jp/nicochannel/material/design/5677558/img_main_01.png') no-repeat center; background-size: 170px; content: ''; display: block; width:130px; height:100px; position: absolute; } .thumb_anchor { position: relative; } `) }; const modMyListPage = () => { mask('.NC-VideoMediaObject-metaCount', '#bebebe'); addStyle(` .NC-Thumbnail-image::after { background: #222 url('https://secure-dcdn.cdn.nimg.jp/nicochannel/material/design/5677558/img_main_01.png') no-repeat center; background-size: 120%; content: ''; display: block; width:100%; height:100%; position: absolute; } `); }; const href = location.href; if (href.startsWith('https://www.nicovideo.jp/watch/')) { modPlayPage(); } else if (href === 'https://ch.nicovideo.jp/mushokutomeisai') { modChannelPage(); } else { modMyListPage(); } })();