精简优酷页面
当前为
// ==UserScript==
// @name 优酷页面精简
// @namespace Violentmonkey Scripts
// @grant none
// @description 精简优酷页面
// @match *://v.youku.com/*
// @version 0.1
// ==/UserScript==
// ==== V0.1 Tips =====
// 作者:@mordom0404
var fobiddenlist = [".list_ad_wrap", ".sideCol", "#module_basic_relationleft", "#module_basic_comment", "#module_basic_comment", "#sideTool"];
var removeadd = [],time = [];
fobiddenlist.map(function(v, i) {
time[i] = 20;
removeadd[i] = window.setInterval(function() {
if ($(v).remove().length > 0) {
window.clearInterval(removeadd[i])
}
if (time[i] == 0) {
window.clearInterval(removeadd[i])
}
time[i]--;
console.log(v)
}, 1000)
})
var removeadd2 = [],time2 = [];
var moduleadd = $("[id^=module_ad]")
moduleadd.map(function(m, i) {
time2[i] = 20;
removeadd2[i] = window.setInterval(function() {
if ($(moduleadd[m]).remove().length > 0) {
window.clearInterval(removeadd2[i])
}
if (time2[i] == 0) {
window.clearInterval(removeadd2[i])
}
time2[i]--;
console.log(m)
}, 1000)
})