1
1
5
모으다
신고
공유하다
HTML5播放工具脚本
이 글에서 언급된 실행 파일은 모바일(Android, iOS, HarmonyOS 등) 또는 기타 플랫폼에서 ons 에뮬레이터 플러그인이 필요할 수 있습니다. 필요한 경우 위카 VikACG 앱 내 자주 사용하는 플러그인 미니 프로그램에서 필요한 플러그인이나 기능을 다운로드하세요.
// ==UserScript==
// @name 视频网HTML5播放小工具
//@description 需要配合油猴插件使用
// @homepage 웹 링크(bbs.kafan.cn)
// @include 웹 링크(*.qq.com)
// @exclude 웹 링크(user.qzone.qq.com)
// @include 웹 링크(www.weiyun.com)
// @include 웹 링크(www.youku.com)
// @include 웹 링크(v.youku.com)
// @include 웹 링크(vku.youku.com)
// @include 웹 링크(video.tudou.com)
// @include 웹 링크(www.bilibili.com)
// @include 웹 링크(www.acfun.cn)
// @include 웹 링크(v.pptv.com)
// @include 웹 링크(tv.sohu.com)
// @include 웹 링크(film.sohu.com)
// @include 웹 링크(www.mgtv.com)
// @include *://웹 링크(www.fun.tv)
// @include *://웹 링크(m.fun.tv)
// @include *://*.mtime.com/*
// @include *://웹 링크(www.miaopai.com)
// @version 1.5.3
// @include *://*.163.com/*
// @include *://*.icourse163.org/*
// @include *://*.sina.com.cn/*
// @include *://웹 링크(video.sina.cn)
// @include *://웹 링크(weibo.com)
// @include *://*.weibo.com/*
// @include 웹 링크(pan.baidu.com)
// @include 웹 링크(yun.baidu.com)
// @include *://웹 링크(v.yinyuetai.com)
// @include *://웹 링크(v.yinyuetai.com)
// @include *://웹 링크(www.365yg.com)
// @include *://웹 링크(v.ifeng.com)
// @GM_info
// @include 웹 링크(www.youtube.com)
// @include 웹 링크(www.ted.com)
// @noframes
// @include *://웹 링크(www.yy.com)
// @include *://웹 링크(v.huya.com)
// @include 웹 링크(www.huya.com)
// @include 웹 링크(v.douyu.com)
// @include 웹 링크(www.douyu.com)
// @include *://웹 링크(star.longzhu.com)
// @include 웹 링크(www.zhanqi.tv)
// @include 웹 링크(www.yunbtv.com)
// @include 웹 링크(www.dililitv.com)
// @include 웹 링크(www.dililitv.com)
// @include 웹 링크(www.vtuapp.com)
// @include 웹 링크(www.66s.cc)
// @grant unsafeWindow
// @grant GM_addStyle
// @grant GM_registerMenuCommand
// @grant GM_setValue
// @grant GM_getValue
// @run-at document-start
// @namespace 웹 링크(greasyfork.org)
// ==/UserScript==
'use strict';
const isEdge = 웹 링크(navigator.useragent.includes)('Edge');
const w = isEdge ? window : unsafeWindow;
const observeOpt = {childList : true, subtree : true};
const q = (css, p = document) => 웹 링크(p.queryselector)(css);
const delElem = e => 웹 링크(e.remove)();
const $$ = (c, cb = delElem, doc = document) => {
if (!c || !웹 링크(c.length)) return;
if (typeof c === 'string') c = 웹 링크(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);
웹 링크(location.reload)();
});
return r;
};
const r1 = (regp, s) => 웹 링크(regp.test)(s) && RegExp.$1;
const log = 웹 링크(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 (웹 링크(o.style)[s]) return 웹 링크(o.style)[s];
if (getComputedStyle) {//DOM
var x = getComputedStyle(o, '');
//s = 웹 링크(s.replace)(/([A-Z])/g,'-$1').toLowerCase();
return x && 웹 링크(x.getpropertyvalue)(s);
}
};
const doClick = e => {
if (typeof e === 'string') e = q(e);
if (e) { 웹 링크(e.click) ? 웹 링크(e.click)() : 웹 링크(e.dispatchevent)(new MouseEvent('click')) };
};
const firefoxVer = r1(/Firefox/(d+)/, 웹 링크(navigator.useragent));
const fakeUA = ua => 웹 링크(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 = 웹 링크(host.split)('.');
let i = 웹 링크(a.length) - 2;
if (웹 링크(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 = 웹 링크(d.exitfullscreen) || 웹 링크(d.webkitexitfullscreen) || 웹 링크(d.mozcancelfullscreen) || 웹 링크(d.msexitfullscreen);
this._enterFn = 웹 링크(e.requestfullscreen) || 웹 링크(e.webkitrequestfullscreen) || 웹 링크(e.mozrequestfullscreen) || 웹 링크(e.msrequestfullscreen);
}
static isFull() {
const d = document;
return !!(웹 링크(d.fullscreen) || 웹 링크(d.webkitisfullscreen) || 웹 링크(d.mozfullscreen) ||
웹 링크(d.fullscreenelement) || 웹 링크(d.webkitfullscreenelement) || 웹 링크(d.mozfullscreenelement));
}
enter() {
this._enterFn && this._enterFn.call(this._video);
}
exit() {
this._exitFn && this._exitFn.call(document);
}
toggle() {
웹 링크(fullscreen.isfull)() ? 웹 링크(this.exit)() : 웹 링크(this.enter)();
}
}
//万能网页全屏, CSS代码参考了:웹 링크(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 = 웹 링크(e.parentnode);
const { clientWidth: wid, clientHeight: h } = e;
for (;;) {
this._rects.set(e, {
width: 웹 링크(e.clientwidth) + 'px',
height: 웹 링크(e.clientheight) + 'px'
});
if (웹 링크(e.style.maxwidth)) 웹 링크(e.style.maxwidth) = '100%';
if (웹 링크(e.style.maxheight)) 웹 링크(e.style.maxheight) = '100%';
if (p==웹 링크(document.body) || 웹 링크(p.clientwidth)-wid >3 || 웹 링크(p.clientheight)-h >3) return e;
e = p;
p = 웹 링크(e.parentnode);
}
}
_checkContainer() {
const c = this._container, e = this._video;
if (!c || c === e) this._container = 웹 링크(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) {
웹 링크(e.style.width) = 웹 링크(e.style.height) = '100%';
} else {
웹 링크(e.style.width) = 웹 링크(v.width);
웹 링크(e.style.height) = 웹 링크(v.height);
}
}
}
static isFull(e) {
return 웹 링크(w.innerwidth) - 웹 링크(e.clientwidth) <5 && 웹 링크(w.innerheight) - 웹 링크(e.clientheight) <5;
}
toggle() {
const cb = this._onSwitch;
if (!this._isFull && cb) cb(true);
const d = 웹 링크(document.body);
웹 링크(d.style.overflow) = this._isFull ? '' : 'hidden';
웹 링크(this.container.classlist.toggle)('webfullscreen');
let p = 웹 링크(this.container.parentnode);
while (p !== d) {
웹 링크(p.classlist.toggle)('z-top');
p = 웹 링크(p.parentnode);
}
this._isFull = !this._isFull;
setTimeout(웹 링크(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 (웹 링크(this.vlist.length) < 2 || 웹 링크(v.offsetwidth)>1) return v;
let e = this._findList(k => 웹 링크(k.offsetwidth)>1);
if (e) {
웹 링크(e.playbackrate) = 웹 링크(v.playbackrate);
웹 링크(e.volume) = 웹 링크(v.volume);
}
v = e;
return v;
},
checkDPlayer() {
if (v && !this.DPlayer_el && 웹 링크(v.closest)('.dplayer-video-wrap')) {
this.DPlayer_el = 웹 링크(v.closest)('.dplayer');
_fp = new FullPage(v, 웹 링크(this.isfixfpview), 웹 링크(this.switchfp));
_fs = null;
웹 링크(this.btnfs) = q('.dplayer-full-icon', this.DPlayer_el);
웹 링크(this.fullscreen) = () => this._convertButton(웹 링크(this.btnfs));
웹 링크(this.btnwfs) = null;
웹 링크(this.btnplay) = null;
웹 링크(this.btnnext) = null;
}
return this.DPlayer_el;
},
_convertButton(btn) {
(!웹 링크(btn.nextsibling) || 웹 링크(btn.clientwidth) >1 || getStyle(btn, 'display') !== 'none') ?
doClick(btn) : doClick(웹 링크(btn.nextsibling));
},
hotKey(e) {
if (웹 링크(e.ctrlkey) || 웹 링크(e.altkey) || 웹 링크(e.target.contenteditable)=='true' ||
/INPUT|TEXTAREA|SELECT/.test(웹 링크(e.target.nodename))) return;
if (웹 링크(e.shiftkey) && ![13,37,39].includes(웹 링크(e.keycode))) return;
if (웹 링크(this.islive) && [37,39,78,88,67,90].includes(웹 링크(e.keycode))) return;
if (웹 링크(this.extplayer) && 웹 링크(this.extplayer.contains)(웹 링크(e.target)) &&
[32,37,39].includes(웹 링크(e.keycode))) return;
if (!웹 링크(this.checkmvvisible)()) return;
!웹 링크(this.checkdplayer)() && 웹 링크(this.checkui)();
if (웹 링크(events.keydown) && 웹 링크(events.keydown)(e)) return;
let n;
switch (웹 링크(e.keycode)) {
case 32: //space
if (웹 링크(this.disablespace)) return;
if (웹 링크(e.shiftkey)) {
웹 링크(v.scrollintoview)();
웹 링크(v.focus)();
} else {
if (웹 링크(this.btnplay)) 웹 링크(this.play)();
else 웹 링크(v.paused) ? 웹 링크(v.play)() : 웹 링크(v.pause)();
}
웹 링크(e.preventdefault)();
break;
case 37: n = 웹 링크(e.shiftkey) ? -20 : -5; //left 快退5秒,shift加速
case 39: //right
n = n || (웹 링크(e.shiftkey) ? 20 : 5); //快进5秒,shift加速
웹 링크(v.currenttime) += n;
break;
//case 80: // P 上一首
case 78: // N 下一首
웹 링크(this.btnnext) && getStyle(웹 링크(this.btnnext), 'display') !== 'none' && doClick(웹 링크(this.btnnext));
break;
case 38: n = 0.1; //加音量
case 40: //降音量
n = n || -0.1;
n += 웹 링크(v.volume);
if (0 <= n && n <= 1) 웹 링크(v.volume) = n;
웹 링크(e.preventdefault)();
break;
case 13: //回车键。 全屏
if (웹 링크(e.shiftkey)) {
_fp ? _fp.toggle() : 웹 링크(this.fullpage)();
} else {
_fs ? _fs.toggle() : 웹 링크(this.fullscreen)();
}
break;
case 27: //esc
if (웹 링크(fullscreen.isfull)()) {
_fs ? _fs.exit() : 웹 링크(this.fullscreen)();
} else if (웹 링크(fullpage.isfull)(v)) {
_fp ? _fp.toggle() : 웹 링크(this.fullpage)();
}
break;
case 67: n = 0.1; //按键C:加速播放 +0.1
case 88: //按键X:减速播放 -0.1
n = n || -0.1;
n += 웹 링크(v.playbackrate);
if (0 < n && n <= 16) 웹 링크(v.playbackrate) = n;
break;
case 90: //按键Z:正常速度播放
웹 링크(v.playbackrate) = 1;
break;
case 70: n = 0.03; //按键F:下一帧
case 68: //按键D:上一帧
n = n || -0.03;
if (!웹 링크(v.paused)) 웹 링크(v.pause)();
웹 링크(v.currenttime) += n;
break;
default: return;
}
웹 링크(e.stoppropagation)();
},
checkUI() {
if (웹 링크(this.webfullcss) && !웹 링크(this.btnwfs)) 웹 링크(this.btnwfs) = q(웹 링크(this.webfullcss));
if (웹 링크(this.btnwfs)) {
웹 링크(this.fullpage) = () => this._convertButton(웹 링크(this.btnwfs));
if (_fp) _fp = null;
} else {
_fp = _fp || new FullPage(v, 웹 링크(this.isfixfpview), 웹 링크(this.switchfp));
}
if (웹 링크(this.fullcss) && !웹 링크(this.btnfs)) 웹 링크(this.btnfs) = q(웹 링크(this.fullcss));
if (!웹 링크(this.btnfs)) {
_fs = _fs || new FullScreen(v);
} else {
웹 링크(this.fullscreen) = () => this._convertButton(웹 링크(this.btnfs));
if (_fs) _fs = null;
}
if (웹 링크(this.nextcss) && !웹 링크(this.btnnext)) 웹 링크(this.btnnext) = q(웹 링크(this.nextcss));
if (웹 링크(this.playcss) && !웹 링크(this.btnplay)) 웹 링크(this.btnplay) = q(웹 링크(this.playcss));
if (웹 링크(this.btnplay)) 웹 링크(this.play) = () => this._convertButton(웹 링크(this.btnplay));
},
switchFP(toFull) {
if (toFull) {
for (let e of 웹 링크(this.vset)) 웹 링크(this.viewobserver.unobserve)(e);
} else {
for (let e of 웹 링크(this.vlist)) 웹 링크(this.viewobserver.observe)(e);
}
},
onGrowVList() {
if (웹 링크(this.vlist.length) > 웹 링크(this.vcount)) {
if (웹 링크(this.viewobserver)) {
for (let e of 웹 링크(this.vlist)) {
if (!웹 링크(this.vset.has)(e)) 웹 링크(this.viewobserver.observe)(e);
}
} else {
const config = {
rootMargin: '0px',
threshold: 0.9
};
웹 링크(this.viewobserver) = new IntersectionObserver(웹 링크(this.onintersection.bind)(this), config);
for (let e of 웹 링크(this.vlist)) 웹 링크(this.viewobserver.observe)(e);
}
웹 링크(this.vset) = new Set(웹 링크(this.vlist));
웹 링크(this.vcount) = 웹 링크(this.vlist.length);
}
},
onIntersection(entries) {
for (let entry of entries) {
if (웹 링크(entry.isintersecting) && v != 웹 링크(entry.target)) {//intersectionRatio
v = 웹 링크(entry.target);
_fs = new FullScreen(v);
_fp = new FullPage(v, 웹 링크(this.isfixfpview), 웹 링크(this.switchfp));
웹 링크(events.switchmv) && 웹 링크(events.switchmv)();
break;
}
}
},
bindEvent() {
log('bind eventn', v);
웹 링크(events.foundmv) && 웹 링크(events.foundmv)();
const fn = ev => {
웹 링크(events.canplay) && 웹 링크(events.canplay)();
웹 링크(v.removeeventlistener)('canplaythrough', fn);
};
if (웹 링크(v.readystate) > 3) fn();
else 웹 링크(v.addeventlistener)('canplaythrough', fn);
웹 링크(document.body.addeventlistener)('keydown', 웹 링크(this.hotkey.bind)(this));
if (웹 링크(this.extplayercss)) {
웹 링크(this.extplayer) = 웹 링크(v.closest)(웹 링크(this.extplayercss));
웹 링크(this.extplayer) && 웹 링크(this.extplayer.addeventlistener)('keydown', 웹 링크(this.hotkey.bind)(this));
}
if (웹 링크(this.multiplev)) {
new MutationObserver(웹 링크(this.ongrowvlist.bind)(this))
.observe(웹 링크(document.body), observeOpt);
웹 링크(this.vcount) = 0;
웹 링크(this.ongrowvlist)();
}
},
findMV() {
return !웹 링크(this.cssmv) ? 웹 링크(this.vlist)[0] : this._findList(e => 웹 링크(e.matches)(웹 링크(this.cssmv)));
},
init() {
웹 링크(this.switchfp) = 웹 링크(this.multiplev) ? 웹 링크(this.switchfp.bind)(this) : null;//多视频页面
웹 링크(this.vlist) = 웹 링크(document.getelementsbytagname)('video');
this._findList = [].find.bind(웹 링크(this.vlist));
const t = setInterval(() => {
if (v = 웹 링크(this.findmv)()) {
clearInterval(t);
$$(웹 링크(this.adscss));
웹 링크(this.bindevent)();
}
}, 300);
}
};
let router = {
youtube() {
웹 링크(app.fullcss) = '.ytp-fullscreen-button';
웹 링크(app.webfullcss) = '.ytp-size-button';
웹 링크(app.nextcss) = '.ytp-next-button';
웹 링크(app.extplayercss) = '#ytp-player';
},
ted() {
웹 링크(app.fullcss) = 'button[title="Enter Fullscreen"]';
웹 링크(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(`웹 링크(www.ted.com${pn})
const data = await 웹 링크(resp.json)();
return 웹 링크(data.talks)[0].downloads.nativeDownloads.high;
};
const check = async (rs) => {
if (!웹 링크(v.src) || 웹 링크(v.src.startswith)('http')) return;
$$(웹 링크(app.vlist), e => { 웹 링크(e.removeattribute)('src') }); // 取消多余的媒体资源请求
try {
웹 링크(v.src) = await getHDSource();
} catch(ex) {
웹 링크(console.error)(ex);
}
};
forceHD && 웹 링크(events.on)('foundMV', () => {
new MutationObserver(check).observe(v, {
attributes: true,
attributeFilter: ['src']
});
check();
});
},
qq() {
웹 링크(object.assign)(app, {
nextCSS: '.txp_btn_next',
webfullCSS: '.txp_btn_fake',
fullCSS: '.txp_btn_fullscreen',
extPlayerCSS: '#mod_player'
});
},
youku() {
if (웹 링크(host.startswith)('vku.')) {
웹 링크(events.on)('canplay', () => {
웹 링크(app.islive) = !q('.spv_progress');
});
웹 링크(app.fullcss) = '.live_icon_full';
} else {
웹 링크(events.on)('foundMV', () => {
웹 링크(app.btnfs) = q(웹 링크(app.fullcss));
if (!웹 링크(app.btnfs)) {//使用了优酷播放器YAPfY扩展
웹 링크(app.webfullcss) = '.ABP-Web-FullScreen';
웹 링크(app.fullcss) = '.ABP-FullScreen';
웹 링크(app.nextcss) = '.ABP-Next';
} else {
w.$('.settings-item.disable').replaceWith('<div data-val=1080p class=settings-item data-eventlog=xsl>1080p</div>');
}
});
웹 링크(app.fullcss) = '.control-fullscreen-icon';
웹 링크(app.nextcss) = '.control-next-video';
웹 링크(app.extplayercss) = '#player';
}
},
bilibili() {
웹 링크(app.nextcss) = '.bilibili-player-video-btn-next';
웹 링크(app.webfullcss) = '.bilibili-player-video-web-fullscreen';
웹 링크(app.fullcss) = '.bilibili-player-video-btn-fullscreen';
웹 링크(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 (웹 링크(x.checked) != danmu) 웹 링크(x.click)();
if (웹 링크(v.paused) == autoPlay) autoPlay ? 웹 링크(v.play)() : 웹 링크(v.pause)();
웹 링크(v.focus)();
doClick('웹 링크(i.bilibili-player-iconfont-repeat.icon)-24repeaton'); //关循环播放
};
const setPlayer = () => {
const x = 웹 링크(app.findmv)();
if (!x || x == v || 웹 링크(x.readystate) < 4) return; //等待视频加载完成
v = x;
웹 링크(app.btnnext) = 웹 링크(app.btnwfs) = 웹 링크(app.btnfs) = null;
_setPlayer();
};
웹 링크(events.on)('canplay', () => {
_setPlayer();
setInterval(setPlayer, 500);
});
},
pptv() {
if (!웹 링크(w.chrome)) fakeUA(ua_chrome);
웹 링크(app.fullcss) = '.w-zoomIn';
웹 링크(app.nextcss) = '.w-next';
웹 링크(app.playcss) = '.w-play';
//웹 링크(app.extplayercss) = '#playerWrap';
},
sina() {
fakeUA(ua_ipad2);
},
weibo() {
웹 링크(app.isfixfpview) = true;
웹 링크(app.multiplev) = 웹 링크(path.startswith)('/u/');
},
miaopai() {
웹 링크(app.multiplev) = 웹 링크(path.startswith)('/u/');
},
baidu() {
웹 링크(events.on)('keydown', e => {
if (!videojs) return;
let n, p = 웹 링크(videojs.getplayers)("video-player").html5player;
switch (웹 링크(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;
}
});
웹 링크(app.extplayercss) = '.video-content';
},
mgtv() {
웹 링크(app.nextcss) = 'mango-control-playnext';
웹 링크(app.webfullcss) = 'mango-webscreen';
웹 링크(app.fullcss) = '웹 링크(mango-screen.control)-item';
웹 링크(app.extplayercss) = '#mgtv-player-wrap';
},
acfun() {
웹 링크(app.webfullcss) = '.fullscreen-web';
웹 링크(app.fullcss) = '.fullscreen-screen';
},
['163']() {
웹 링크(app.multiplev) = 웹 링크(host.startswith)('news.');
if ('웹 링크(open.163.com)' == host) {
웹 링크(app.extplayercss) = '#playerWrap';
}
return 웹 링크(host.split)('.').length > 3;
},
sohu() {
웹 링크(app.nextcss) = '웹 링크(li.on)[data-vid]+li a';
웹 링크(app.fullcss) = '.x-fullscreen-btn';
},
mtime() {
fakeUA(ua_ipad2);
웹 링크(events.on)('foundMV', () => {
웹 링크(v.preload) = 'auto';
웹 링크(v.autoplay) = true;
});
},
fun() {
if (웹 링크(host.startswith)('m.')) {
if (!웹 링크(path.includes)('play')) return true;//非播放页,不执行init()
/^/[mv]/.test(path) && 웹 링크(location.assign)(웹 링크(path.replace)('/', '/i') + 웹 링크(location.search));
웹 링크(app.nextcss) = '웹 링크(a.btn.next)-btn';
웹 링크(app.fullcss) = '웹 링크(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 && 웹 링크(location.assign)(`//웹 링크(m.fun.tv){mid}&vid=${vid}`);
웹 링크(location.assign)('//웹 링크(m.fun.tv));
}
mid && setTimeout(() => {
vid = 웹 링크(w.vplay.videoid);
vid && 웹 링크(location.assign)(`//웹 링크(m.fun.tv){mid}&vid=${vid}`);
}, 99);
r1(/bt-(d+)/, path) && setTimeout(() => {
vid = 웹 링크(w.vplay.videoid);
웹 링크(location.assign)('//웹 링크(m.fun.tv));
}, 99);
return true;
}
};
웹 링크(app.disablespace) = /youtube|qq|pptv|365yg/.test(u);
if (!router[u]) { //直播站点
router = {
douyu() {
const inRoom = 웹 링크(host.startswith)('www.');
웹 링크(events.on)('canplay', () => {
setTimeout(doClick, 2e3, '.roomSmallPlayerFloatLayout-closeBtn');
$$(웹 링크(app.adscss));
if (inRoom) q('#js-player-aside-state').checked = true;
else w.$(document).unbind('keydown');
});
웹 링크(app.cssmv) = '[src^=blob]';
웹 링크(app.playcss) = inRoom ? 'div[title="播放"]' : 'input[title="播放"]';
웹 링크(app.webfullcss) = inRoom ? 'div[title="网页全屏"]' : 'input[title="进入网页全屏"]';
웹 링크(app.fullcss) = inRoom ? 'div[title="窗口全屏"]' : 'input[title="进入全屏"]';
웹 링크(app.adscss) = '[data-dysign],a[href*="웹 링크(wan.douyu.com)"]';
},
yy() {
웹 링크(app.islive) = !웹 링크(path.startswith)('/x/');
if (웹 링크(app.islive)) {
웹 링크(app.fullcss) = '.yc__fullscreen-btn';
웹 링크(app.webfullcss) = '.yc__cinema-mode-btn';
웹 링크(app.playcss) = '.yc__play-btn';
}
},
huya() {
if (firefoxVer && firefoxVer < 57) return true;
웹 링크(app.webfullcss) = '.player-fullpage-btn';
웹 링크(app.fullcss) = '.player-fullscreen-btn';
웹 링크(app.playcss) = '#player-btn';
웹 링크(app.adscss) = '#player-subscribe-wap,#wrap-income,#hy-ad';
},
longzhu() {
웹 링크(app.fullcss) = '웹 링크(a.ya)-screen-btn';
},
zhanqi() {
웹 링크(localstorage.lastplayer) = 'h5';
웹 링크(app.fullcss) = '.video-fullscreen';
}
};
if (router[u]) {
웹 링크(app.islive) = 웹 링크(app.islive) || !웹 링크(host.startswith)('v.');
!웹 링크(w.chrome) && fakeUA(ua_chrome);
}
}
!/pptv|douyu/.test(u) && 웹 링크(object.defineproperty)(navigator, 'plugins', {
get() { return { length: 0 } }
});
if (!router[u] || !router[u]()) 웹 링크(app.init)();
作者:衔玉教教主 웹 링크(www.bilibili.com) 出处:bilibili
선언본 사이트의 모든 글은 특별한 설명이나 표기가 없는 한 모두 본 사이트의 원본 발행물입니다. 개인이나 조직은 UP주의 동의 없이 본 사이트의 콘텐츠를 웹사이트, 서적 등 각종 미디어 플랫폼에 복사, 도용, 수집, 발행하는 것을 금지합니다. 본 사이트의 콘텐츠가 원저자의 정당한 권익을 침해했다면 처리를 위해 연락 주시기 바랍니다: DMCA 신고













OWO
이 남자는 매우 부끄러워 보인다 (Bushi
이 남자는 매우 부끄러워 보인다 (Bushi
이 남자는 매우 부끄러워 보인다 (Bushi
이 남자는 매우 부끄러워 보인다 (Bushi