// ==UserScript== // @name bilibili旧播放页 // @namespace Motoori Kashin // @version 2.0 // @description 切换旧版播放页面,布局、播放器全部切换回2009年12月09日之前的样子。 // @author Motoori Kashin // @match *://*.bilibili.com/video/av* // @match *://*.bilibili.com/watchlater/* // @license MIT // @run-at document-start // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; //window.stop();/*阻止原页面继续加载,但配合`@run-at document-start`可能会导致无法重写网页,故注释之并预先重写了遍网页*/ document.open();document.write('
切换旧版播放中……
');document.close(); if(location.pathname.startsWith('/video')) { wrVideo(); } else{ wrWatchlater(); } function wrVideo(){ const xhr = new XMLHttpRequest(); xhr.open('GET', window.location.href); xhr.onload = () => { var html = xhr.responseText; var wrh = html.match(/' + '
' + '
' + '' + '' + '' + '' + '' + '' + '' + '' + '' + ''; return wrb; } function wrWatchlater(){ var html = '
'; document.open(); document.write(html); document.close(); } })();