remove divs of advertisements at https://m.feiszw.com
Від
// ==UserScript==
// @name feiszw_remove_advs
// @namespace http://netoday.cn
// @version 0.1
// @description remove divs of advertisements at https://m.feiszw.com
// @author crazy_pig
// @match https://*/*
// @match http://*/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// @license MIT
// ==/UserScript==
const advTagName = "vkr";
(function() {
'use strict';
// get url user visited
var _url = (window.location + "").toLowerCase();
// if need active script
if (_url.indexOf("feiszw.com") > 0){
setInterval(function (){
_recursion_set_style(document.body.children);
}, 300);
}
})();
/**
* set font \ background-color \ font-family
*/
function _recursion_set_style(childrenNodes){
if (typeof(childrenNodes) !== 'undefined'){
var i;
// set visibility hidden
var startFlag = false;
for (i =0; i < childrenNodes.length ; i++){
if (startFlag &&
'SCRIPT' !== childrenNodes[i].tagName.trim().toUpperCase() &&
'SPAN' !== childrenNodes[i].tagName.trim().toUpperCase()){
childrenNodes[i].style.visibility = "hidden";
}
if('AUDIO' === childrenNodes[i].tagName.trim().toUpperCase()){
startFlag = true;
}
}
}
}