// ==UserScript== // @name Bilibili 旧播放页 // @namespace https://greasyfork.org/zh-CN/scripts/394296 // @version 2.3.0 // @description 切换旧版播放页面,布局、播放器全部切换回2019年12月09日之前的样子。 // @author Motoori Kashin // @match *://*.bilibili.com/video/av* // @match *://*.bilibili.com/watchlater/* // @match *://*.bilibili.com/bangumi/play/ss* // @match *://*.bilibili.com/bangumi/play/ep* // @license MIT // @run-at document-start // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; const OHTML = "
" + document.getElementsByTagName("head")[0].innerHTML + ""; const path = location.pathname.match(/(?<=\/).*?(?=\/)/)[0]; let obj = { 'video' : () => { if (OHTML.match(/biliconfig/) == null){wrVideo(OHTML);} let reh = setInterval(function(){ let reHead = document.getElementsByClassName("bili-header-m"); if (reHead[0]) reHead[0].setAttribute("style","display: none;"); if (reHead[1]){ reHead[0].removeAttribute("style"); reHead[1].remove(); document.getElementById("bofqi").removeAttribute("style"); clearInterval(reh); } }, 10); }, 'watchlater' : () => { wrWatchlater(OHTML); }, 'bangumi' : () => { wrBangumi(OHTML); } } obj[path](); let cdm = setInterval(function(){ let dmList = document.getElementsByClassName("bilibili-player-filter-btn")[1]; if (dmList){ dmList.click(); clearInterval(cdm); } }, 10); function wrVideo(oht){ let html = oht; html = html.replace(/' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + ''; return wrb; } function wrWatchlater(oht){ let html = ''; document.open(); document.write(html); document.close(); } function wrBangumi(oht){ let html = oht; html = html.replace(/' + '' + '' + '' + '' + ''; html = html.replace(/<\/head>/g,wrh); let wrb = bgmBody(); html = html.replace(/xxx/g,wrb); document.open(); document.write(html); document.close(); } function bgmBody(){ let wrb = '' + '' + '' + '' + '' + '' + '' + ''; return wrb; } })();