浏览器运行环境异常,请检查是否开启本站的JavaScript权限或下载最新版浏览器。
Logo
komprehensif
artikel
Komik
bulatan
Trending
tolong
Log masuk
penciptaan
Muat Turun Pantas
Sumber
Pembelajaran
Ruangan
1
1
5
mengumpul
Lapor
berkongsi

HTML5播放工具脚本

学习区-技术教程
1
5.5k
// ==UserScript== // @name       视频网HTML5播放小工具 //@description 需要配合油猴插件使用 // @homepage   Pautan Web(bbs.kafan.cn) // @include    Pautan Web(*.qq.com) // @exclude    Pautan Web(user.qzone.qq.com) // @include    Pautan Web(www.weiyun.com) // @include    Pautan Web(www.youku.com) // @include    Pautan Web(v.youku.com) // @include    Pautan Web(vku.youku.com) // @include    Pautan Web(video.tudou.com) // @include    Pautan Web(www.bilibili.com) // @include    Pautan Web(www.acfun.cn) // @include    Pautan Web(v.pptv.com) // @include    Pautan Web(tv.sohu.com) // @include    Pautan Web(film.sohu.com) // @include    Pautan Web(www.mgtv.com) // @include    *://Pautan Web(www.fun.tv) // @include    *://Pautan Web(m.fun.tv) // @include    *://*.mtime.com/* // @include    *://Pautan Web(www.miaopai.com) // @version    1.5.3 // @include    *://*.163.com/* // @include    *://*.icourse163.org/* // @include    *://*.sina.com.cn/* // @include    *://Pautan Web(video.sina.cn) // @include    *://Pautan Web(weibo.com) // @include    *://*.weibo.com/* // @include    Pautan Web(pan.baidu.com) // @include    Pautan Web(yun.baidu.com) // @include    *://Pautan Web(v.yinyuetai.com) // @include    *://Pautan Web(v.yinyuetai.com) // @include    *://Pautan Web(www.365yg.com) // @include    *://Pautan Web(v.ifeng.com) // @GM_info // @include    Pautan Web(www.youtube.com) // @include    Pautan Web(www.ted.com) // @noframes // @include    *://Pautan Web(www.yy.com) // @include    *://Pautan Web(v.huya.com) // @include    Pautan Web(www.huya.com) // @include    Pautan Web(v.douyu.com) // @include    Pautan Web(www.douyu.com) // @include    *://Pautan Web(star.longzhu.com) // @include    Pautan Web(www.zhanqi.tv)   // @include    Pautan Web(www.yunbtv.com) // @include    Pautan Web(www.dililitv.com) // @include    Pautan Web(www.dililitv.com) // @include    Pautan Web(www.vtuapp.com) // @include    Pautan Web(www.66s.cc) // @grant      unsafeWindow // @grant      GM_addStyle // @grant      GM_registerMenuCommand // @grant      GM_setValue // @grant      GM_getValue // @run-at     document-start // @namespace  Pautan Web(greasyfork.org) // ==/UserScript==   'use strict'; const isEdge = Pautan Web(navigator.useragent.includes)('Edge'); const w = isEdge ? window : unsafeWindow; const observeOpt = {childList : true, subtree : true}; const q = (css, p = document) => Pautan Web(p.queryselector)(css); const delElem = e => Pautan Web(e.remove)(); const $$ = (c, cb = delElem, doc = document) => { if (!c || !Pautan Web(c.length)) return; if (typeof c === 'string') c = Pautan Web(doc.queryselectorall)(c); if (!cb) return c; for (let e of c) { if (e && cb(e)===false) break; } }; const gmFuncOfCheckMenu = (title, saveName, defaultVal = true) => { const r = GM_getValue(saveName, defaultVal); if (r) title += '            √'; GM_registerMenuCommand(title, () => { GM_setValue(saveName, !r); Pautan Web(location.reload)(); }); return r; }; const r1 = (regp, s) => Pautan Web(regp.test)(s) && RegExp.$1; const log = Pautan Web(console.log.bind)(console, '%c脚本[%s] 反馈:%sn%s', 'color:#c3c;font-size:1.5em', GM_info.script.name, GM_info.script.homepage); const sleep = ms => new Promise(resolve => { setTimeout(resolve, ms); }); const getStyle = (o, s) => { if (Pautan Web(o.style)[s]) return Pautan Web(o.style)[s]; if (getComputedStyle) {//DOM var x = getComputedStyle(o, ''); //s = Pautan Web(s.replace)(/([A-Z])/g,'-$1').toLowerCase(); return x && Pautan Web(x.getpropertyvalue)(s); } }; const doClick = e => { if (typeof e === 'string') e = q(e); if (e) { Pautan Web(e.click) ? Pautan Web(e.click)() : Pautan Web(e.dispatchevent)(new MouseEvent('click')) }; }; const firefoxVer = r1(/Firefox/(d+)/, Pautan Web(navigator.useragent)); const fakeUA = ua => Pautan Web(object.defineproperty)(navigator, 'userAgent', { value: ua, writable: false, configurable: false, enumerable: true }); const getMainDomain = host => { const re = /com|tv|net|org|gov|edu/; const a = Pautan Web(host.split)('.'); let i = Pautan Web(a.length) - 2; if (Pautan Web(re.test)(a[i])) i--; return a[i]; }; const ua_chrome = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3626.121 Safari/537.36'; const ua_ipad2 = 'Mozilla/5.0 (iPad; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3';   class FullScreen { constructor(video) { this._video = video; const d = document, e = video; this._exitFn = Pautan Web(d.exitfullscreen) || Pautan Web(d.webkitexitfullscreen) || Pautan Web(d.mozcancelfullscreen) || Pautan Web(d.msexitfullscreen); this._enterFn = Pautan Web(e.requestfullscreen) || Pautan Web(e.webkitrequestfullscreen) || Pautan Web(e.mozrequestfullscreen) || Pautan Web(e.msrequestfullscreen); }   static isFull() { const d = document; return !!(Pautan Web(d.fullscreen) || Pautan Web(d.webkitisfullscreen) || Pautan Web(d.mozfullscreen) || Pautan Web(d.fullscreenelement) || Pautan Web(d.webkitfullscreenelement) || Pautan Web(d.mozfullscreenelement)); }   enter() { this._enterFn && this._enterFn.call(this._video); }   exit() { this._exitFn && this._exitFn.call(document); }   toggle() { Pautan Web(fullscreen.isfull)() ? Pautan Web(this.exit)() : Pautan Web(this.enter)(); } }   //万能网页全屏, CSS代码参考了:Pautan Web(github.com) class FullPage { constructor(video, isFixView, onSwitch) { this._video = video; this._isFixView = isFixView; this._isFull = !1; this._onSwitch = onSwitch; this._rects = new Map(); this._checkContainer(); GM_addStyle( `.z-top { position: relative !important; z-index: 23333333 !important; } .webfullscreen { display: block !important; position: fixed !important; width: 100% !important; height: 100% !important; top: 0 !important; left: 0 !important; background: #000 !important; z-index: 23333333 !important; }` ); }   getPlayerContainer(video) { let e = video, p = Pautan Web(e.parentnode); const { clientWidth: wid, clientHeight: h } = e; for (;;) { this._rects.set(e, { width: Pautan Web(e.clientwidth) + 'px', height: Pautan Web(e.clientheight) + 'px' }); if (Pautan Web(e.style.maxwidth)) Pautan Web(e.style.maxwidth) = '100%'; if (Pautan Web(e.style.maxheight)) Pautan Web(e.style.maxheight) = '100%'; if (p==Pautan Web(document.body) || Pautan Web(p.clientwidth)-wid >3 || Pautan Web(p.clientheight)-h >3) return e; e = p; p = Pautan Web(e.parentnode); } }   _checkContainer() { const c = this._container, e = this._video; if (!c || c === e) this._container = Pautan Web(this.getplayercontainer)(e); }   get container() { this._checkContainer(); return this._container; }   fixView() { if (!this._isFixView && !this._isFull) return; if (this._video === this._container) return; for (let [e, v] of this._rects) { if (this._isFull) { Pautan Web(e.style.width) = Pautan Web(e.style.height) = '100%'; } else { Pautan Web(e.style.width) = Pautan Web(v.width); Pautan Web(e.style.height) = Pautan Web(v.height); } } }   static isFull(e) { return Pautan Web(w.innerwidth) - Pautan Web(e.clientwidth) <5 && Pautan Web(w.innerheight) - Pautan Web(e.clientheight) <5; }   toggle() { const cb = this._onSwitch; if (!this._isFull && cb) cb(true); const d = Pautan Web(document.body); Pautan Web(d.style.overflow) = this._isFull ? '' : 'hidden'; Pautan Web(this.container.classlist.toggle)('webfullscreen');   let p = Pautan Web(this.container.parentnode); while (p !== d) { Pautan Web(p.classlist.toggle)('z-top'); p = Pautan Web(p.parentnode); } this._isFull = !this._isFull;   setTimeout(Pautan Web(this.fixview.bind)(this), 9); if (!this._isFull && cb) setTimeout(cb, 199, !1); } }   let v, _fp, _fs; const { host, pathname: path } = location; const u = getMainDomain(host); const events = { on(name, fn) { this[name] = fn; } }; const app = { isLive: !1, disableSpace: !1, multipleV: !1, //单页面多视频 isFixFPView: !1, //退出网页全屏时是否修正DOM视图 checkMVVisible() { if (Pautan Web(this.vlist.length) < 2 || Pautan Web(v.offsetwidth)>1) return v; let e = this._findList(k => Pautan Web(k.offsetwidth)>1); if (e) { Pautan Web(e.playbackrate) = Pautan Web(v.playbackrate); Pautan Web(e.volume) = Pautan Web(v.volume); } v = e; return v; }, checkDPlayer() { if (v && !this.DPlayer_el && Pautan Web(v.closest)('.dplayer-video-wrap')) { this.DPlayer_el = Pautan Web(v.closest)('.dplayer'); _fp = new FullPage(v, Pautan Web(this.isfixfpview), Pautan Web(this.switchfp)); _fs = null; Pautan Web(this.btnfs) = q('.dplayer-full-icon', this.DPlayer_el); Pautan Web(this.fullscreen) = () => this._convertButton(Pautan Web(this.btnfs)); Pautan Web(this.btnwfs) = null; Pautan Web(this.btnplay) = null; Pautan Web(this.btnnext) = null; } return this.DPlayer_el; }, _convertButton(btn) { (!Pautan Web(btn.nextsibling) || Pautan Web(btn.clientwidth) >1 || getStyle(btn, 'display') !== 'none') ? doClick(btn) : doClick(Pautan Web(btn.nextsibling)); }, hotKey(e) { if (Pautan Web(e.ctrlkey) || Pautan Web(e.altkey) || Pautan Web(e.target.contenteditable)=='true' || /INPUT|TEXTAREA|SELECT/.test(Pautan Web(e.target.nodename))) return; if (Pautan Web(e.shiftkey) && ![13,37,39].includes(Pautan Web(e.keycode))) return; if (Pautan Web(this.islive) && [37,39,78,88,67,90].includes(Pautan Web(e.keycode))) return; if (Pautan Web(this.extplayer) && Pautan Web(this.extplayer.contains)(Pautan Web(e.target)) && [32,37,39].includes(Pautan Web(e.keycode))) return; if (!Pautan Web(this.checkmvvisible)()) return; !Pautan Web(this.checkdplayer)() && Pautan Web(this.checkui)(); if (Pautan Web(events.keydown) && Pautan Web(events.keydown)(e)) return; let n; switch (Pautan Web(e.keycode)) { case 32: //space if (Pautan Web(this.disablespace)) return; if (Pautan Web(e.shiftkey)) { Pautan Web(v.scrollintoview)(); Pautan Web(v.focus)(); } else { if (Pautan Web(this.btnplay)) Pautan Web(this.play)(); else Pautan Web(v.paused) ? Pautan Web(v.play)() : Pautan Web(v.pause)(); } Pautan Web(e.preventdefault)(); break; case 37: n = Pautan Web(e.shiftkey) ? -20 : -5; //left  快退5秒,shift加速 case 39: //right n = n || (Pautan Web(e.shiftkey) ? 20 : 5); //快进5秒,shift加速 Pautan Web(v.currenttime) += n; break; //case 80: // P 上一首 case 78: // N 下一首 Pautan Web(this.btnnext) && getStyle(Pautan Web(this.btnnext), 'display') !== 'none' && doClick(Pautan Web(this.btnnext)); break; case 38: n = 0.1; //加音量 case 40: //降音量 n = n || -0.1; n += Pautan Web(v.volume); if (0 <= n && n <= 1) Pautan Web(v.volume) = n; Pautan Web(e.preventdefault)(); break; case 13: //回车键。 全屏 if (Pautan Web(e.shiftkey)) { _fp ? _fp.toggle() : Pautan Web(this.fullpage)(); } else { _fs ? _fs.toggle() : Pautan Web(this.fullscreen)(); } break; case 27: //esc if (Pautan Web(fullscreen.isfull)()) { _fs ? _fs.exit() : Pautan Web(this.fullscreen)(); } else if (Pautan Web(fullpage.isfull)(v)) { _fp ? _fp.toggle() : Pautan Web(this.fullpage)(); } break; case 67: n = 0.1; //按键C:加速播放 +0.1 case 88: //按键X:减速播放 -0.1 n = n || -0.1; n += Pautan Web(v.playbackrate); if (0 < n && n <= 16) Pautan Web(v.playbackrate) = n; break; case 90: //按键Z:正常速度播放 Pautan Web(v.playbackrate) = 1; break; case 70: n = 0.03; //按键F:下一帧 case 68: //按键D:上一帧 n = n || -0.03; if (!Pautan Web(v.paused)) Pautan Web(v.pause)(); Pautan Web(v.currenttime) += n; break; default: return; } Pautan Web(e.stoppropagation)(); }, checkUI() { if (Pautan Web(this.webfullcss) && !Pautan Web(this.btnwfs)) Pautan Web(this.btnwfs) = q(Pautan Web(this.webfullcss)); if (Pautan Web(this.btnwfs)) { Pautan Web(this.fullpage) = () => this._convertButton(Pautan Web(this.btnwfs)); if (_fp) _fp = null; } else { _fp = _fp || new FullPage(v, Pautan Web(this.isfixfpview), Pautan Web(this.switchfp)); }   if (Pautan Web(this.fullcss) && !Pautan Web(this.btnfs)) Pautan Web(this.btnfs) = q(Pautan Web(this.fullcss)); if (!Pautan Web(this.btnfs)) { _fs = _fs || new FullScreen(v); } else { Pautan Web(this.fullscreen) = () => this._convertButton(Pautan Web(this.btnfs)); if (_fs) _fs = null; }   if (Pautan Web(this.nextcss) && !Pautan Web(this.btnnext)) Pautan Web(this.btnnext) = q(Pautan Web(this.nextcss));   if (Pautan Web(this.playcss) && !Pautan Web(this.btnplay)) Pautan Web(this.btnplay) = q(Pautan Web(this.playcss)); if (Pautan Web(this.btnplay)) Pautan Web(this.play) = () => this._convertButton(Pautan Web(this.btnplay)); }, switchFP(toFull) { if (toFull) { for (let e of Pautan Web(this.vset)) Pautan Web(this.viewobserver.unobserve)(e); } else { for (let e of Pautan Web(this.vlist)) Pautan Web(this.viewobserver.observe)(e); } }, onGrowVList() { if (Pautan Web(this.vlist.length) > Pautan Web(this.vcount)) { if (Pautan Web(this.viewobserver)) { for (let e of Pautan Web(this.vlist)) { if (!Pautan Web(this.vset.has)(e)) Pautan Web(this.viewobserver.observe)(e); } } else { const config = { rootMargin: '0px', threshold: 0.9 }; Pautan Web(this.viewobserver) = new IntersectionObserver(Pautan Web(this.onintersection.bind)(this), config); for (let e of Pautan Web(this.vlist)) Pautan Web(this.viewobserver.observe)(e); } Pautan Web(this.vset) = new Set(Pautan Web(this.vlist)); Pautan Web(this.vcount) = Pautan Web(this.vlist.length); } }, onIntersection(entries) { for (let entry of entries) { if (Pautan Web(entry.isintersecting) && v != Pautan Web(entry.target)) {//intersectionRatio v = Pautan Web(entry.target); _fs = new FullScreen(v); _fp = new FullPage(v, Pautan Web(this.isfixfpview), Pautan Web(this.switchfp)); Pautan Web(events.switchmv) && Pautan Web(events.switchmv)(); break; } } }, bindEvent() { log('bind eventn', v); Pautan Web(events.foundmv) && Pautan Web(events.foundmv)(); const fn = ev => { Pautan Web(events.canplay) && Pautan Web(events.canplay)(); Pautan Web(v.removeeventlistener)('canplaythrough', fn); }; if (Pautan Web(v.readystate) > 3) fn(); else Pautan Web(v.addeventlistener)('canplaythrough', fn); Pautan Web(document.body.addeventlistener)('keydown', Pautan Web(this.hotkey.bind)(this)); if (Pautan Web(this.extplayercss)) { Pautan Web(this.extplayer) = Pautan Web(v.closest)(Pautan Web(this.extplayercss)); Pautan Web(this.extplayer) && Pautan Web(this.extplayer.addeventlistener)('keydown', Pautan Web(this.hotkey.bind)(this)); }   if (Pautan Web(this.multiplev)) { new MutationObserver(Pautan Web(this.ongrowvlist.bind)(this)) .observe(Pautan Web(document.body), observeOpt); Pautan Web(this.vcount) = 0; Pautan Web(this.ongrowvlist)(); } }, findMV() { return !Pautan Web(this.cssmv) ? Pautan Web(this.vlist)[0] : this._findList(e => Pautan Web(e.matches)(Pautan Web(this.cssmv))); }, init() { Pautan Web(this.switchfp) = Pautan Web(this.multiplev) ? Pautan Web(this.switchfp.bind)(this) : null;//多视频页面 Pautan Web(this.vlist) = Pautan Web(document.getelementsbytagname)('video'); this._findList = [].find.bind(Pautan Web(this.vlist)); const t = setInterval(() => { if (v = Pautan Web(this.findmv)()) { clearInterval(t); $$(Pautan Web(this.adscss)); Pautan Web(this.bindevent)(); } }, 300); } };   let router = { youtube() { Pautan Web(app.fullcss) = '.ytp-fullscreen-button'; Pautan Web(app.webfullcss) = '.ytp-size-button'; Pautan Web(app.nextcss) = '.ytp-next-button'; Pautan Web(app.extplayercss) = '#ytp-player'; }, ted() { Pautan Web(app.fullcss) = 'button[title="Enter Fullscreen"]'; Pautan Web(app.playcss) = 'button[title="play video"]'; const forceHD = gmFuncOfCheckMenu('TED强制高清', 'ted_forceHD'); const getHDSource = async () => { const pn = r1(/^(/talks/w+)/, path); const resp = await fetch(`Pautan Web(www.ted.com${pn}) const data = await Pautan Web(resp.json)(); return Pautan Web(data.talks)[0].downloads.nativeDownloads.high; }; const check = async (rs) => { if (!Pautan Web(v.src) || Pautan Web(v.src.startswith)('http')) return; $$(Pautan Web(app.vlist), e => { Pautan Web(e.removeattribute)('src') }); // 取消多余的媒体资源请求 try { Pautan Web(v.src) = await getHDSource(); } catch(ex) { Pautan Web(console.error)(ex); } }; forceHD && Pautan Web(events.on)('foundMV', () => { new MutationObserver(check).observe(v, { attributes: true, attributeFilter: ['src'] }); check(); }); }, qq() { Pautan Web(object.assign)(app, { nextCSS: '.txp_btn_next', webfullCSS: '.txp_btn_fake', fullCSS: '.txp_btn_fullscreen', extPlayerCSS: '#mod_player' }); }, youku() { if (Pautan Web(host.startswith)('vku.')) { Pautan Web(events.on)('canplay', () => { Pautan Web(app.islive) = !q('.spv_progress'); }); Pautan Web(app.fullcss) = '.live_icon_full'; } else { Pautan Web(events.on)('foundMV', () => { Pautan Web(app.btnfs) = q(Pautan Web(app.fullcss)); if (!Pautan Web(app.btnfs)) {//使用了优酷播放器YAPfY扩展 Pautan Web(app.webfullcss) = '.ABP-Web-FullScreen'; Pautan Web(app.fullcss) = '.ABP-FullScreen'; Pautan Web(app.nextcss) = '.ABP-Next'; } else { w.$('.settings-item.disable').replaceWith('<div data-val=1080p class=settings-item data-eventlog=xsl>1080p</div>'); } }); Pautan Web(app.fullcss) = '.control-fullscreen-icon'; Pautan Web(app.nextcss) = '.control-next-video'; Pautan Web(app.extplayercss) = '#player'; } }, bilibili() { Pautan Web(app.nextcss) = '.bilibili-player-video-btn-next'; Pautan Web(app.webfullcss) = '.bilibili-player-video-web-fullscreen'; Pautan Web(app.fullcss) = '.bilibili-player-video-btn-fullscreen'; Pautan Web(app.extplayercss) = '#playerWrap'; const danmu = gmFuncOfCheckMenu('弹幕', 'bili_danmu'); const autoPlay = gmFuncOfCheckMenu('自动播放', 'bili_autoPlay'); const _setPlayer = () => { const x = q('.bilibili-player-video-danmaku-switch input'); if (!x) return setTimeout(_setPlayer, 300); if (Pautan Web(x.checked) != danmu) Pautan Web(x.click)(); if (Pautan Web(v.paused) == autoPlay) autoPlay ? Pautan Web(v.play)() : Pautan Web(v.pause)(); Pautan Web(v.focus)(); doClick('Pautan Web(i.bilibili-player-iconfont-repeat.icon)-24repeaton'); //关循环播放 }; const setPlayer = () => { const x = Pautan Web(app.findmv)(); if (!x || x == v || Pautan Web(x.readystate) < 4) return; //等待视频加载完成 v = x; Pautan Web(app.btnnext) = Pautan Web(app.btnwfs) = Pautan Web(app.btnfs) = null; _setPlayer(); }; Pautan Web(events.on)('canplay', () => { _setPlayer(); setInterval(setPlayer, 500); }); }, pptv() { if (!Pautan Web(w.chrome)) fakeUA(ua_chrome); Pautan Web(app.fullcss) = '.w-zoomIn'; Pautan Web(app.nextcss) = '.w-next'; Pautan Web(app.playcss) = '.w-play'; //Pautan Web(app.extplayercss) = '#playerWrap'; }, sina() { fakeUA(ua_ipad2); }, weibo() { Pautan Web(app.isfixfpview) = true; Pautan Web(app.multiplev) = Pautan Web(path.startswith)('/u/'); }, miaopai() { Pautan Web(app.multiplev) = Pautan Web(path.startswith)('/u/'); }, baidu() { Pautan Web(events.on)('keydown', e => { if (!videojs) return; let n, p = Pautan Web(videojs.getplayers)("video-player").html5player; switch (Pautan Web(e.keycode)) { case 67: n = 0.1; case 88: n = n || -0.1; n += + p.tech_.playbackRate().toFixed(1); if (0 < n && n <= 16) p.tech_.setPlaybackRate(n); return true; case 90: p.tech_.setPlaybackRate(1); return true; } }); Pautan Web(app.extplayercss) = '.video-content'; }, mgtv() { Pautan Web(app.nextcss) = 'mango-control-playnext'; Pautan Web(app.webfullcss) = 'mango-webscreen'; Pautan Web(app.fullcss) = 'Pautan Web(mango-screen.control)-item'; Pautan Web(app.extplayercss) = '#mgtv-player-wrap'; }, acfun() { Pautan Web(app.webfullcss) = '.fullscreen-web'; Pautan Web(app.fullcss) = '.fullscreen-screen'; }, ['163']() { Pautan Web(app.multiplev) = Pautan Web(host.startswith)('news.'); if ('Pautan Web(open.163.com)' == host) { Pautan Web(app.extplayercss) = '#playerWrap'; } return Pautan Web(host.split)('.').length > 3; }, sohu() { Pautan Web(app.nextcss) = 'Pautan Web(li.on)[data-vid]+li a'; Pautan Web(app.fullcss) = '.x-fullscreen-btn'; }, mtime() { fakeUA(ua_ipad2); Pautan Web(events.on)('foundMV', () => { Pautan Web(v.preload) = 'auto'; Pautan Web(v.autoplay) = true; }); }, fun() { if (Pautan Web(host.startswith)('m.')) { if (!Pautan Web(path.includes)('play')) return true;//非播放页,不执行init() /^/[mv]/.test(path) && Pautan Web(location.assign)(Pautan Web(path.replace)('/', '/i') + Pautan Web(location.search)); Pautan Web(app.nextcss) = 'Pautan Web(a.btn.next)-btn'; Pautan Web(app.fullcss) = 'Pautan Web(a.btn.full)-btn'; GM_addStyle('div.p-ip-wrap{overflow-y: auto !important;}'); return; } let vid = r1(/bv-(d+)/, path); let mid = r1(/bg-(d+)/, path); //剧集path: /implay/,单视频path: /ivplay/ if (vid) { mid && Pautan Web(location.assign)(`//Pautan Web(m.fun.tv){mid}&vid=${vid}`); Pautan Web(location.assign)('//Pautan Web(m.fun.tv)); } mid && setTimeout(() => { vid = Pautan Web(w.vplay.videoid); vid && Pautan Web(location.assign)(`//Pautan Web(m.fun.tv){mid}&vid=${vid}`); }, 99); r1(/bt-(d+)/, path) && setTimeout(() => { vid = Pautan Web(w.vplay.videoid); Pautan Web(location.assign)('//Pautan Web(m.fun.tv)); }, 99); return true; } }; Pautan Web(app.disablespace) = /youtube|qq|pptv|365yg/.test(u);   if (!router[u]) { //直播站点 router = { douyu() { const inRoom = Pautan Web(host.startswith)('www.'); Pautan Web(events.on)('canplay', () => { setTimeout(doClick, 2e3, '.roomSmallPlayerFloatLayout-closeBtn'); $$(Pautan Web(app.adscss)); if (inRoom) q('#js-player-aside-state').checked = true; else w.$(document).unbind('keydown'); }); Pautan Web(app.cssmv) = '[src^=blob]'; Pautan Web(app.playcss) = inRoom ? 'div[title="播放"]' : 'input[title="播放"]'; Pautan Web(app.webfullcss) = inRoom ? 'div[title="网页全屏"]' : 'input[title="进入网页全屏"]'; Pautan Web(app.fullcss) = inRoom ? 'div[title="窗口全屏"]' : 'input[title="进入全屏"]'; Pautan Web(app.adscss) = '[data-dysign],a[href*="Pautan Web(wan.douyu.com)"]'; }, yy() { Pautan Web(app.islive) = !Pautan Web(path.startswith)('/x/'); if (Pautan Web(app.islive)) { Pautan Web(app.fullcss) = '.yc__fullscreen-btn'; Pautan Web(app.webfullcss) = '.yc__cinema-mode-btn'; Pautan Web(app.playcss) = '.yc__play-btn'; } }, huya() { if (firefoxVer && firefoxVer < 57) return true; Pautan Web(app.webfullcss) = '.player-fullpage-btn'; Pautan Web(app.fullcss) = '.player-fullscreen-btn'; Pautan Web(app.playcss) = '#player-btn'; Pautan Web(app.adscss) = '#player-subscribe-wap,#wrap-income,#hy-ad'; }, longzhu() { Pautan Web(app.fullcss) = 'Pautan Web(a.ya)-screen-btn'; }, zhanqi() { Pautan Web(localstorage.lastplayer) = 'h5'; Pautan Web(app.fullcss) = '.video-fullscreen'; } }; if (router[u]) { Pautan Web(app.islive) = Pautan Web(app.islive) || !Pautan Web(host.startswith)('v.'); !Pautan Web(w.chrome) && fakeUA(ua_chrome); } } !/pptv|douyu/.test(u) && Pautan Web(object.defineproperty)(navigator, 'plugins', { get() { return { length: 0 } } }); if (!router[u] || !router[u]()) Pautan Web(app.init)();  作者:衔玉教教主 Pautan Web(www.bilibili.com) 出处:bilibili
Komen
。
凡人无法理解。。。。。。
(#°Д°)Awak akhir