// ==UserScript==
// @name vipVideos_skipAd
// @namespace vipVideos_skipAd-xinggsf
// @author xinggsf
// @description 配合ABP去视频广告;开启GPU加速
// @homepageURL https://greasyfork.org/scripts/8561
// updateURL https://greasyfork.org/scripts/8561.js
// @include http*
// @exclude https://www.youtube.com/*
// @exclude http://www.acfun.tv/*
// @exclude http://acfun.tudou.com/*
// @exclude http://*.dj92cc.com/*
//全面支持音悦台HTML5播放,详见 https://greasyfork.org/scripts/14593
// @exclude http://*.yinyuetai.com/*
// @version 2016.4.11
// @encoding utf-8
// @grant unsafeWindow
// @downloadURL none
// ==/UserScript==
-function(doc, bd) {
"use strict";
let isEmbed, swfAddr,
isRedirect = !1,//是否开启Redirect重定向扩展/UC脚本,暂时只对iqiyi播放器有效
swfBlockList = [
'http://staticlive.douyutv.com/upload/signs/201',
'http://www.kcis.cn/wp-content/themes/kcis/adv.',
],
swfWhiteList = [
'http://s5.pdim.gs/static/',
],
PLAYER_URL = [
{
urls: [
/^http:\/\/static\.youku\.com\/.*?q?(?:play|load)er\w*\.swf/,
/^http:\/\/player\.youku\.com\/player\.php\/sid\/(\w+).*?v\.swf$/,
// /^http:\/\/cdn\.aixifan\.com\/player\/cooperation\/AcFunXYouku\.swf/,
],
varsMatch: /VideoIDS=(\w+)/,
format: youkuFormat,
isProc: function(p, fv, src) {
switch(true){
case doc.domain.endsWith('acfun.tv'):
fv = fv.match(/vid=(\w+)/);
fv && setPlayer(p, youkuFormat(fv[1]));
return !1;
case !doc.domain.endsWith('youku.com'):
fv = src.match(this.urls[1]) || src.match(this.varsMatch) ||
fv.match(this.varsMatch);
fv && ykOutsitePlayer(fv[1], p);
return !1;
default:
setTimeout(scrollTo(0, 99), 9);
unsafeWindow._ssPlayer = p.outerHTML.replace('direct','gpu');
doc.querySelector("div#ab_pip").outerHTML =
'换原播放器';
return !0;
}
}
},{
urls: [
/^http:\/\/www\.iqiyi\.com\/common\/flashplayer/,
// /^http:\/\/cdn\.aixifan\.com\/player\/cooperation\/AcFunXQiyi\.swf/,
/^http:\/\/dispatcher\.video\.qiyi\.com\/disp\/shareplayer\.swf/,
],
run: function(p, src) {
var v = getFlashvars(p);
if (/iqiyi\.com|pps\.tv/.test(location.hostname)){
v = v.replace(/&(?:cid|tipdataurl|\w+?Time|cpn\w|\w*?loader|adurl|yhls|exclusive|webEventID|videoIsFromQidan)=[^&]*/g,'') + '&cid=qc_100001_300089';
setPlayer(p, iqiyiFormat(src,v));
} else qyOutsiteFormat(p, v);
}
},
];
function youkuFormat(vid) {
//下载https://raw.githubusercontent.com/xinggsf/gm/master/yk.swf到本地,可替换
return `