代码拉取完成,页面将自动刷新
// 腾讯、优酷和爱奇艺跳过广告
var url = window.location.href;
if(new RegExp("v.qq.com").test(url)) {
window.setInterval(function (){
let time = document.querySelectorAll(".txp_ad video");
if(time.length) {
for(let i = 0; i<time.length; i++){
time[i].currentTime = 110
}
}
}, 1000);
}else if(new RegExp("v.youku.com").test(url)) {
var timerTask = window.setInterval(function (){
//$(".h5-ext-layer").find("div").remove();$(".control-play-icon").click()
var oDiv = document.querySelectorAll(".h5-ext-layer div");
if(oDiv && oDiv.length > 0){
console.log(oDiv.length);
Array.from(oDiv).forEach(i => i.remove());
console.log("成功移除元素:.h5-ext-layer div")
var oIcon = document.getElementsByClassName("control-play-icon");
if(oIcon && oIcon.length>0) oIcon[0].click();
console.log("成功点击:.control-play-icon");
window.clearInterval(timerTask);
}else{
console.log(".h5-ext-layer div 尚未加载!!!")
}
}, 1000);
} else if(new RegExp("iqiyi.com").test(url)) {
(function(){
function callback(){
var oTime = document.querySelector(".cd-time");
if(oTime && oTime.innerText > 0) {
var oDiv = document.querySelector(".skippable-after");
if(oDiv){
oDiv.click();
console.log("成功点击 .skippable-after");
oTime.innerText = 0;
}
// tp_vip-time1 //tp_vip-free
let tpVipTime1 = document.querySelector('.tp_vip-time1');
if(tpVipTime1.innerText > 0){
let tpVipFree = document.querySelector('.tp_vip-free');
tpVipFree.click();
console.log("成功点击 .tp_vip-free");
tpVipTime1.innerText = 0;
}
// sports-cd-time sports-vip-text
let sportsCdTime = document.querySelector('.sports-cd-time');
if(sportsCdTime.innerText > 0){
let sportsVipText = document.querySelector('.sports-vip-text');
sportsVipText.click();
console.log("成功点击 .sportsVipText");
sportsCdTime.innerText = 0;
}
// tp_close-time tp_close-txt
let tpCloseTime = document.querySelector('.tp_close-time');
if(tpCloseTime.innerText > 0){
let tpCloseTxt = document.querySelector('.tp_close-txt');
tpCloseTxt.click();
console.log("成功点击 .tpCloseTxt");
tpCloseTime.innerText = 0;
}
}
}
let flashbox = document.getElementById('flashbox');
let observer = new MutationObserver(callback);
observer.observe(flashbox, { childList: true, subtree: true });
})();
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。