1
1
5
mengumpulkan
Laporkan
membagikan
HTML5播放工具脚本
File yang dapat dieksekusi yang disebutkan dalam artikel ini mungkin memerlukan plugin emulator ons untuk berjalan di perangkat seluler (Android, iOS, HarmonyOS, dll.) atau platform lain. Jika diperlukan, silakan unduh plugin atau fitur yang diperlukan dari mini program Plugin Umum di aplikasi VikACG.
// ==UserScript==
// @name 视频网HTML5播放小工具
//@description 需要配合油猴插件使用
// @homepage Tautan web(bbs.kafan.cn)
// @include Tautan web(*.qq.com)
// @exclude Tautan web(user.qzone.qq.com)
// @include Tautan web(www.weiyun.com)
// @include Tautan web(www.youku.com)
// @include Tautan web(v.youku.com)
// @include Tautan web(vku.youku.com)
// @include Tautan web(video.tudou.com)
// @include Tautan web(www.bilibili.com)
// @include Tautan web(www.acfun.cn)
// @include Tautan web(v.pptv.com)
// @include Tautan web(tv.sohu.com)
// @include Tautan web(film.sohu.com)
// @include Tautan web(www.mgtv.com)
// @include *://Tautan web(www.fun.tv)
// @include *://Tautan web(m.fun.tv)
// @include *://*.mtime.com/*
// @include *://Tautan web(www.miaopai.com)
// @version 1.5.3
// @include *://*.163.com/*
// @include *://*.icourse163.org/*
// @include *://*.sina.com.cn/*
// @include *://Tautan web(video.sina.cn)
// @include *://Tautan web(weibo.com)
// @include *://*.weibo.com/*
// @include Tautan web(pan.baidu.com)
// @include Tautan web(yun.baidu.com)
// @include *://Tautan web(v.yinyuetai.com)
// @include *://Tautan web(v.yinyuetai.com)
// @include *://Tautan web(www.365yg.com)
// @include *://Tautan web(v.ifeng.com)
// @GM_info
// @include Tautan web(www.youtube.com)
// @include Tautan web(www.ted.com)
// @noframes
// @include *://Tautan web(www.yy.com)
// @include *://Tautan web(v.huya.com)
// @include Tautan web(www.huya.com)
// @include Tautan web(v.douyu.com)
// @include Tautan web(www.douyu.com)
// @include *://Tautan web(star.longzhu.com)
// @include Tautan web(www.zhanqi.tv)
// @include Tautan web(www.yunbtv.com)
// @include Tautan web(www.dililitv.com)
// @include Tautan web(www.dililitv.com)
// @include Tautan web(www.vtuapp.com)
// @include Tautan web(www.66s.cc)
// @grant unsafeWindow
// @grant GM_addStyle
// @grant GM_registerMenuCommand
// @grant GM_setValue
// @grant GM_getValue
// @run-at document-start
// @namespace Tautan web(greasyfork.org)
// ==/UserScript==
'use strict';
const isEdge = Tautan web(navigator.useragent.includes)('Edge');
const w = isEdge ? window : unsafeWindow;
const observeOpt = {childList : true, subtree : true};
const q = (css, p = document) => Tautan web(p.queryselector)(css);
const delElem = e => Tautan web(e.remove)();
const $$ = (c, cb = delElem, doc = document) => {
if (!c || !Tautan web(c.length)) return;
if (typeof c === 'string') c = Tautan 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);
Tautan web(location.reload)();
});
return r;
};
const r1 = (regp, s) => Tautan web(regp.test)(s) && RegExp.$1;
const log = Tautan 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 (Tautan web(o.style)[s]) return Tautan web(o.style)[s];
if (getComputedStyle) {//DOM
var x = getComputedStyle(o, '');
//s = Tautan web(s.replace)(/([A-Z])/g,'-$1').toLowerCase();
return x && Tautan web(x.getpropertyvalue)(s);
}
};
const doClick = e => {
if (typeof e === 'string') e = q(e);
if (e) { Tautan web(e.click) ? Tautan web(e.click)() : Tautan web(e.dispatchevent)(new MouseEvent('click')) };
};
const firefoxVer = r1(/Firefox/(d+)/, Tautan web(navigator.useragent));
const fakeUA = ua => Tautan 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 = Tautan web(host.split)('.');
let i = Tautan web(a.length) - 2;
if (Tautan 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 = Tautan web(d.exitfullscreen) || Tautan web(d.webkitexitfullscreen) || Tautan web(d.mozcancelfullscreen) || Tautan web(d.msexitfullscreen);
this._enterFn = Tautan web(e.requestfullscreen) || Tautan web(e.webkitrequestfullscreen) || Tautan web(e.mozrequestfullscreen) || Tautan web(e.msrequestfullscreen);
}
static isFull() {
const d = document;
return !!(Tautan web(d.fullscreen) || Tautan web(d.webkitisfullscreen) || Tautan web(d.mozfullscreen) ||
Tautan web(d.fullscreenelement) || Tautan web(d.webkitfullscreenelement) || Tautan web(d.mozfullscreenelement));
}
enter() {
this._enterFn && this._enterFn.call(this._video);
}
exit() {
this._exitFn && this._exitFn.call(document);
}
toggle() {
Tautan web(fullscreen.isfull)() ? Tautan web(this.exit)() : Tautan web(this.enter)();
}
}
//万能网页全屏, CSS代码参考了:Tautan 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 = Tautan web(e.parentnode);
const { clientWidth: wid, clientHeight: h } = e;
for (;;) {
this._rects.set(e, {
width: Tautan web(e.clientwidth) + 'px',
height: Tautan web(e.clientheight) + 'px'
});
if (Tautan web(e.style.maxwidth)) Tautan web(e.style.maxwidth) = '100%';
if (Tautan web(e.style.maxheight)) Tautan web(e.style.maxheight) = '100%';
if (p==Tautan web(document.body) || Tautan web(p.clientwidth)-wid >3 || Tautan web(p.clientheight)-h >3) return e;
e = p;
p = Tautan web(e.parentnode);
}
}
_checkContainer() {
const c = this._container, e = this._video;
if (!c || c === e) this._container = Tautan 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) {
Tautan web(e.style.width) = Tautan web(e.style.height) = '100%';
} else {
Tautan web(e.style.width) = Tautan web(v.width);
Tautan web(e.style.height) = Tautan web(v.height);
}
}
}
static isFull(e) {
return Tautan web(w.innerwidth) - Tautan web(e.clientwidth) <5 && Tautan web(w.innerheight) - Tautan web(e.clientheight) <5;
}
toggle() {
const cb = this._onSwitch;
if (!this._isFull && cb) cb(true);
const d = Tautan web(document.body);
Tautan web(d.style.overflow) = this._isFull ? '' : 'hidden';
Tautan web(this.container.classlist.toggle)('webfullscreen');
let p = Tautan web(this.container.parentnode);
while (p !== d) {
Tautan web(p.classlist.toggle)('z-top');
p = Tautan web(p.parentnode);
}
this._isFull = !this._isFull;
setTimeout(Tautan 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 (Tautan web(this.vlist.length) < 2 || Tautan web(v.offsetwidth)>1) return v;
let e = this._findList(k => Tautan web(k.offsetwidth)>1);
if (e) {
Tautan web(e.playbackrate) = Tautan web(v.playbackrate);
Tautan web(e.volume) = Tautan web(v.volume);
}
v = e;
return v;
},
checkDPlayer() {
if (v && !this.DPlayer_el && Tautan web(v.closest)('.dplayer-video-wrap')) {
this.DPlayer_el = Tautan web(v.closest)('.dplayer');
_fp = new FullPage(v, Tautan web(this.isfixfpview), Tautan web(this.switchfp));
_fs = null;
Tautan web(this.btnfs) = q('.dplayer-full-icon', this.DPlayer_el);
Tautan web(this.fullscreen) = () => this._convertButton(Tautan web(this.btnfs));
Tautan web(this.btnwfs) = null;
Tautan web(this.btnplay) = null;
Tautan web(this.btnnext) = null;
}
return this.DPlayer_el;
},
_convertButton(btn) {
(!Tautan web(btn.nextsibling) || Tautan web(btn.clientwidth) >1 || getStyle(btn, 'display') !== 'none') ?
doClick(btn) : doClick(Tautan web(btn.nextsibling));
},
hotKey(e) {
if (Tautan web(e.ctrlkey) || Tautan web(e.altkey) || Tautan web(e.target.contenteditable)=='true' ||
/INPUT|TEXTAREA|SELECT/.test(Tautan web(e.target.nodename))) return;
if (Tautan web(e.shiftkey) && ![13,37,39].includes(Tautan web(e.keycode))) return;
if (Tautan web(this.islive) && [37,39,78,88,67,90].includes(Tautan web(e.keycode))) return;
if (Tautan web(this.extplayer) && Tautan web(this.extplayer.contains)(Tautan web(e.target)) &&
[32,37,39].includes(Tautan web(e.keycode))) return;
if (!Tautan web(this.checkmvvisible)()) return;
!Tautan web(this.checkdplayer)() && Tautan web(this.checkui)();
if (Tautan web(events.keydown) && Tautan web(events.keydown)(e)) return;
let n;
switch (Tautan web(e.keycode)) {
case 32: //space
if (Tautan web(this.disablespace)) return;
if (Tautan web(e.shiftkey)) {
Tautan web(v.scrollintoview)();
Tautan web(v.focus)();
} else {
if (Tautan web(this.btnplay)) Tautan web(this.play)();
else Tautan web(v.paused) ? Tautan web(v.play)() : Tautan web(v.pause)();
}
Tautan web(e.preventdefault)();
break;
case 37: n = Tautan web(e.shiftkey) ? -20 : -5; //left 快退5秒,shift加速
case 39: //right
n = n || (Tautan web(e.shiftkey) ? 20 : 5); //快进5秒,shift加速
Tautan web(v.currenttime) += n;
break;
//case 80: // P 上一首
case 78: // N 下一首
Tautan web(this.btnnext) && getStyle(Tautan web(this.btnnext), 'display') !== 'none' && doClick(Tautan web(this.btnnext));
break;
case 38: n = 0.1; //加音量
case 40: //降音量
n = n || -0.1;
n += Tautan web(v.volume);
if (0 <= n && n <= 1) Tautan web(v.volume) = n;
Tautan web(e.preventdefault)();
break;
case 13: //回车键。 全屏
if (Tautan web(e.shiftkey)) {
_fp ? _fp.toggle() : Tautan web(this.fullpage)();
} else {
_fs ? _fs.toggle() : Tautan web(this.fullscreen)();
}
break;
case 27: //esc
if (Tautan web(fullscreen.isfull)()) {
_fs ? _fs.exit() : Tautan web(this.fullscreen)();
} else if (Tautan web(fullpage.isfull)(v)) {
_fp ? _fp.toggle() : Tautan web(this.fullpage)();
}
break;
case 67: n = 0.1; //按键C:加速播放 +0.1
case 88: //按键X:减速播放 -0.1
n = n || -0.1;
n += Tautan web(v.playbackrate);
if (0 < n && n <= 16) Tautan web(v.playbackrate) = n;
break;
case 90: //按键Z:正常速度播放
Tautan web(v.playbackrate) = 1;
break;
case 70: n = 0.03; //按键F:下一帧
case 68: //按键D:上一帧
n = n || -0.03;
if (!Tautan web(v.paused)) Tautan web(v.pause)();
Tautan web(v.currenttime) += n;
break;
default: return;
}
Tautan web(e.stoppropagation)();
},
checkUI() {
if (Tautan web(this.webfullcss) && !Tautan web(this.btnwfs)) Tautan web(this.btnwfs) = q(Tautan web(this.webfullcss));
if (Tautan web(this.btnwfs)) {
Tautan web(this.fullpage) = () => this._convertButton(Tautan web(this.btnwfs));
if (_fp) _fp = null;
} else {
_fp = _fp || new FullPage(v, Tautan web(this.isfixfpview), Tautan web(this.switchfp));
}
if (Tautan web(this.fullcss) && !Tautan web(this.btnfs)) Tautan web(this.btnfs) = q(Tautan web(this.fullcss));
if (!Tautan web(this.btnfs)) {
_fs = _fs || new FullScreen(v);
} else {
Tautan web(this.fullscreen) = () => this._convertButton(Tautan web(this.btnfs));
if (_fs) _fs = null;
}
if (Tautan web(this.nextcss) && !Tautan web(this.btnnext)) Tautan web(this.btnnext) = q(Tautan web(this.nextcss));
if (Tautan web(this.playcss) && !Tautan web(this.btnplay)) Tautan web(this.btnplay) = q(Tautan web(this.playcss));
if (Tautan web(this.btnplay)) Tautan web(this.play) = () => this._convertButton(Tautan web(this.btnplay));
},
switchFP(toFull) {
if (toFull) {
for (let e of Tautan web(this.vset)) Tautan web(this.viewobserver.unobserve)(e);
} else {
for (let e of Tautan web(this.vlist)) Tautan web(this.viewobserver.observe)(e);
}
},
onGrowVList() {
if (Tautan web(this.vlist.length) > Tautan web(this.vcount)) {
if (Tautan web(this.viewobserver)) {
for (let e of Tautan web(this.vlist)) {
if (!Tautan web(this.vset.has)(e)) Tautan web(this.viewobserver.observe)(e);
}
} else {
const config = {
rootMargin: '0px',
threshold: 0.9
};
Tautan web(this.viewobserver) = new IntersectionObserver(Tautan web(this.onintersection.bind)(this), config);
for (let e of Tautan web(this.vlist)) Tautan web(this.viewobserver.observe)(e);
}
Tautan web(this.vset) = new Set(Tautan web(this.vlist));
Tautan web(this.vcount) = Tautan web(this.vlist.length);
}
},
onIntersection(entries) {
for (let entry of entries) {
if (Tautan web(entry.isintersecting) && v != Tautan web(entry.target)) {//intersectionRatio
v = Tautan web(entry.target);
_fs = new FullScreen(v);
_fp = new FullPage(v, Tautan web(this.isfixfpview), Tautan web(this.switchfp));
Tautan web(events.switchmv) && Tautan web(events.switchmv)();
break;
}
}
},
bindEvent() {
log('bind eventn', v);
Tautan web(events.foundmv) && Tautan web(events.foundmv)();
const fn = ev => {
Tautan web(events.canplay) && Tautan web(events.canplay)();
Tautan web(v.removeeventlistener)('canplaythrough', fn);
};
if (Tautan web(v.readystate) > 3) fn();
else Tautan web(v.addeventlistener)('canplaythrough', fn);
Tautan web(document.body.addeventlistener)('keydown', Tautan web(this.hotkey.bind)(this));
if (Tautan web(this.extplayercss)) {
Tautan web(this.extplayer) = Tautan web(v.closest)(Tautan web(this.extplayercss));
Tautan web(this.extplayer) && Tautan web(this.extplayer.addeventlistener)('keydown', Tautan web(this.hotkey.bind)(this));
}
if (Tautan web(this.multiplev)) {
new MutationObserver(Tautan web(this.ongrowvlist.bind)(this))
.observe(Tautan web(document.body), observeOpt);
Tautan web(this.vcount) = 0;
Tautan web(this.ongrowvlist)();
}
},
findMV() {
return !Tautan web(this.cssmv) ? Tautan web(this.vlist)[0] : this._findList(e => Tautan web(e.matches)(Tautan web(this.cssmv)));
},
init() {
Tautan web(this.switchfp) = Tautan web(this.multiplev) ? Tautan web(this.switchfp.bind)(this) : null;//多视频页面
Tautan web(this.vlist) = Tautan web(document.getelementsbytagname)('video');
this._findList = [].find.bind(Tautan web(this.vlist));
const t = setInterval(() => {
if (v = Tautan web(this.findmv)()) {
clearInterval(t);
$$(Tautan web(this.adscss));
Tautan web(this.bindevent)();
}
}, 300);
}
};
let router = {
youtube() {
Tautan web(app.fullcss) = '.ytp-fullscreen-button';
Tautan web(app.webfullcss) = '.ytp-size-button';
Tautan web(app.nextcss) = '.ytp-next-button';
Tautan web(app.extplayercss) = '#ytp-player';
},
ted() {
Tautan web(app.fullcss) = 'button[title="Enter Fullscreen"]';
Tautan 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(`Tautan web(www.ted.com${pn})
const data = await Tautan web(resp.json)();
return Tautan web(data.talks)[0].downloads.nativeDownloads.high;
};
const check = async (rs) => {
if (!Tautan web(v.src) || Tautan web(v.src.startswith)('http')) return;
$$(Tautan web(app.vlist), e => { Tautan web(e.removeattribute)('src') }); // 取消多余的媒体资源请求
try {
Tautan web(v.src) = await getHDSource();
} catch(ex) {
Tautan web(console.error)(ex);
}
};
forceHD && Tautan web(events.on)('foundMV', () => {
new MutationObserver(check).observe(v, {
attributes: true,
attributeFilter: ['src']
});
check();
});
},
qq() {
Tautan web(object.assign)(app, {
nextCSS: '.txp_btn_next',
webfullCSS: '.txp_btn_fake',
fullCSS: '.txp_btn_fullscreen',
extPlayerCSS: '#mod_player'
});
},
youku() {
if (Tautan web(host.startswith)('vku.')) {
Tautan web(events.on)('canplay', () => {
Tautan web(app.islive) = !q('.spv_progress');
});
Tautan web(app.fullcss) = '.live_icon_full';
} else {
Tautan web(events.on)('foundMV', () => {
Tautan web(app.btnfs) = q(Tautan web(app.fullcss));
if (!Tautan web(app.btnfs)) {//使用了优酷播放器YAPfY扩展
Tautan web(app.webfullcss) = '.ABP-Web-FullScreen';
Tautan web(app.fullcss) = '.ABP-FullScreen';
Tautan web(app.nextcss) = '.ABP-Next';
} else {
w.$('.settings-item.disable').replaceWith('<div data-val=1080p class=settings-item data-eventlog=xsl>1080p</div>');
}
});
Tautan web(app.fullcss) = '.control-fullscreen-icon';
Tautan web(app.nextcss) = '.control-next-video';
Tautan web(app.extplayercss) = '#player';
}
},
bilibili() {
Tautan web(app.nextcss) = '.bilibili-player-video-btn-next';
Tautan web(app.webfullcss) = '.bilibili-player-video-web-fullscreen';
Tautan web(app.fullcss) = '.bilibili-player-video-btn-fullscreen';
Tautan 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 (Tautan web(x.checked) != danmu) Tautan web(x.click)();
if (Tautan web(v.paused) == autoPlay) autoPlay ? Tautan web(v.play)() : Tautan web(v.pause)();
Tautan web(v.focus)();
doClick('Tautan web(i.bilibili-player-iconfont-repeat.icon)-24repeaton'); //关循环播放
};
const setPlayer = () => {
const x = Tautan web(app.findmv)();
if (!x || x == v || Tautan web(x.readystate) < 4) return; //等待视频加载完成
v = x;
Tautan web(app.btnnext) = Tautan web(app.btnwfs) = Tautan web(app.btnfs) = null;
_setPlayer();
};
Tautan web(events.on)('canplay', () => {
_setPlayer();
setInterval(setPlayer, 500);
});
},
pptv() {
if (!Tautan web(w.chrome)) fakeUA(ua_chrome);
Tautan web(app.fullcss) = '.w-zoomIn';
Tautan web(app.nextcss) = '.w-next';
Tautan web(app.playcss) = '.w-play';
//Tautan web(app.extplayercss) = '#playerWrap';
},
sina() {
fakeUA(ua_ipad2);
},
weibo() {
Tautan web(app.isfixfpview) = true;
Tautan web(app.multiplev) = Tautan web(path.startswith)('/u/');
},
miaopai() {
Tautan web(app.multiplev) = Tautan web(path.startswith)('/u/');
},
baidu() {
Tautan web(events.on)('keydown', e => {
if (!videojs) return;
let n, p = Tautan web(videojs.getplayers)("video-player").html5player;
switch (Tautan 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;
}
});
Tautan web(app.extplayercss) = '.video-content';
},
mgtv() {
Tautan web(app.nextcss) = 'mango-control-playnext';
Tautan web(app.webfullcss) = 'mango-webscreen';
Tautan web(app.fullcss) = 'Tautan web(mango-screen.control)-item';
Tautan web(app.extplayercss) = '#mgtv-player-wrap';
},
acfun() {
Tautan web(app.webfullcss) = '.fullscreen-web';
Tautan web(app.fullcss) = '.fullscreen-screen';
},
['163']() {
Tautan web(app.multiplev) = Tautan web(host.startswith)('news.');
if ('Tautan web(open.163.com)' == host) {
Tautan web(app.extplayercss) = '#playerWrap';
}
return Tautan web(host.split)('.').length > 3;
},
sohu() {
Tautan web(app.nextcss) = 'Tautan web(li.on)[data-vid]+li a';
Tautan web(app.fullcss) = '.x-fullscreen-btn';
},
mtime() {
fakeUA(ua_ipad2);
Tautan web(events.on)('foundMV', () => {
Tautan web(v.preload) = 'auto';
Tautan web(v.autoplay) = true;
});
},
fun() {
if (Tautan web(host.startswith)('m.')) {
if (!Tautan web(path.includes)('play')) return true;//非播放页,不执行init()
/^/[mv]/.test(path) && Tautan web(location.assign)(Tautan web(path.replace)('/', '/i') + Tautan web(location.search));
Tautan web(app.nextcss) = 'Tautan web(a.btn.next)-btn';
Tautan web(app.fullcss) = 'Tautan 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 && Tautan web(location.assign)(`//Tautan web(m.fun.tv){mid}&vid=${vid}`);
Tautan web(location.assign)('//Tautan web(m.fun.tv));
}
mid && setTimeout(() => {
vid = Tautan web(w.vplay.videoid);
vid && Tautan web(location.assign)(`//Tautan web(m.fun.tv){mid}&vid=${vid}`);
}, 99);
r1(/bt-(d+)/, path) && setTimeout(() => {
vid = Tautan web(w.vplay.videoid);
Tautan web(location.assign)('//Tautan web(m.fun.tv));
}, 99);
return true;
}
};
Tautan web(app.disablespace) = /youtube|qq|pptv|365yg/.test(u);
if (!router[u]) { //直播站点
router = {
douyu() {
const inRoom = Tautan web(host.startswith)('www.');
Tautan web(events.on)('canplay', () => {
setTimeout(doClick, 2e3, '.roomSmallPlayerFloatLayout-closeBtn');
$$(Tautan web(app.adscss));
if (inRoom) q('#js-player-aside-state').checked = true;
else w.$(document).unbind('keydown');
});
Tautan web(app.cssmv) = '[src^=blob]';
Tautan web(app.playcss) = inRoom ? 'div[title="播放"]' : 'input[title="播放"]';
Tautan web(app.webfullcss) = inRoom ? 'div[title="网页全屏"]' : 'input[title="进入网页全屏"]';
Tautan web(app.fullcss) = inRoom ? 'div[title="窗口全屏"]' : 'input[title="进入全屏"]';
Tautan web(app.adscss) = '[data-dysign],a[href*="Tautan web(wan.douyu.com)"]';
},
yy() {
Tautan web(app.islive) = !Tautan web(path.startswith)('/x/');
if (Tautan web(app.islive)) {
Tautan web(app.fullcss) = '.yc__fullscreen-btn';
Tautan web(app.webfullcss) = '.yc__cinema-mode-btn';
Tautan web(app.playcss) = '.yc__play-btn';
}
},
huya() {
if (firefoxVer && firefoxVer < 57) return true;
Tautan web(app.webfullcss) = '.player-fullpage-btn';
Tautan web(app.fullcss) = '.player-fullscreen-btn';
Tautan web(app.playcss) = '#player-btn';
Tautan web(app.adscss) = '#player-subscribe-wap,#wrap-income,#hy-ad';
},
longzhu() {
Tautan web(app.fullcss) = 'Tautan web(a.ya)-screen-btn';
},
zhanqi() {
Tautan web(localstorage.lastplayer) = 'h5';
Tautan web(app.fullcss) = '.video-fullscreen';
}
};
if (router[u]) {
Tautan web(app.islive) = Tautan web(app.islive) || !Tautan web(host.startswith)('v.');
!Tautan web(w.chrome) && fakeUA(ua_chrome);
}
}
!/pptv|douyu/.test(u) && Tautan web(object.defineproperty)(navigator, 'plugins', {
get() { return { length: 0 } }
});
if (!router[u] || !router[u]()) Tautan web(app.init)();
作者:衔玉教教主 Tautan web(www.bilibili.com) 出处:bilibili
PernyataanSemua artikel di situs ini, kecuali dinyatakan lain atau ditandai khusus, adalah publikasi asli situs ini. Individu atau organisasi manapun dilarang menyalin, mencuri, mengumpulkan, atau menerbitkan konten situs ini ke situs web, buku, atau platform media lainnya tanpa persetujuan dari UP master. Jika konten situs ini melanggar hak dan kepentingan yang sah dari penulis asli, silakan hubungi kami untuk pemrosesan: Laporan DMCA













OWO
Orang ini sepertinya sangat pemalu (Bushi
Orang ini sepertinya sangat pemalu (Bushi
Orang ini sepertinya sangat pemalu (Bushi
Orang ini sepertinya sangat pemalu (Bushi