您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
吧啦吧啦
当前为
// ==UserScript== // @name 自用bilibili脚本 // @namespace mimiko/bilibili // @version 0.0.3 // @description 吧啦吧啦 // @author Mimiko // @license MIT // @match *://*.bilibili.com/* // @grant GM.addStyle // ==/UserScript== // http://greasyfork.icu/zh-CN/scripts/436748-%E8%87%AA%E7%94%A8bilibili%E8%84%9A%E6%9C%AC (() => { if (window.top !== window.self) return // function const asBangumiMain = () => { asPlayerMain() hide('#review_module') // 隐藏点评 } const asCommonMain = () => { hide('#internationalHeader .nav-link-item:last-of-type') // 移除下载APP } const asIndexLive = () => { // 隐藏顶部播放器 hide('.player-area-ctnr') const timer = window.setInterval(() => { const $video = document.querySelector('video') if (!$video) return window.clearInterval(timer) remove('.player-area-ctnr') }, 200) } const asIndexMain = () => { hide('#reportFirst2') // 隐藏推广 hide('#bili_live') // 隐藏直播 hideByText('#elevator .item', '直播') // 处理电梯 } const asLive = () => { const path = window.location.pathname if (path === '/') return asIndexLive() if (parseInt(path.substring(1), 10)) return asRoomLive() } const asMain = () => { asCommonMain() const path = window.location.pathname if (path === '/') return asIndexMain() if (path.startsWith('/video/BV')) return asVideoMain() if (path.startsWith('/bangumi/play/ep')) return asBangumiMain() } const asPlayerMain = () => { hide('.bilibili-player-electric-panel') // 隐藏充电面板 hide('.bilibili-player-ending-panel') // 隐藏视频推荐 hide('.bilibili-player-video-hint') // 隐藏弹幕礼仪 } const asRoomLive = () => { remove('#my-dear-haruna-vm') // 移除22/33娘 hide('#room-background-vm') // 隐藏背景 } const asVideoMain = () => { asPlayerMain() } const hide = ( selector, ) => GM.addStyle(`${selector} { display: none !important; }`) const hideByText = ( selector, text, ) => document.querySelectorAll(selector).forEach($it => { const content = $it.textContent?.trim() if (content === text) $it.setAttribute('style', 'display: none !important;') }) const log = (...args) => console.log('[bilibili]', ...args) const remove = ( selector, ) => document.querySelectorAll(selector).forEach($it => $it.remove()) const route = () => { const host = window.location.host.split('.')[0] if (host === 'www') return asMain() if (host === 'live') return asLive() } // execute route() })()