Remove Anti-AdBlock Modal
当前为
// ==UserScript==
// @name Anti-DeBlocker
// @version 1.0
// @author Elwyn
// @namespace http://tampermonkey.net/
// @description Remove Anti-AdBlock Modal
// @include *
// @run-at document-start
// @grant unsafeWindow
// ==/UserScript==
function addStyleStr(str) {
var node = document.createElement('style');
node.innerHTML = str;
document.body.appendChild(node);
}
function randomInt( min, max )
{
// min and max included
if ( max === undefined ) {
max = min;
min = 0;
}
return Math.floor(min + Math.random() * (max - min + 1));
}
function getRandomName( size )
{
var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
var i;
var name = '';
for (i = 0; i < (size||randomInt(10,24)); i++)
{
name += chars.charAt( randomInt(0,chars.length) );
}
return name;
}
function addRandomClass( el ) {
var name = el.className;
if ( typeof name != 'undefined' ) {
if( /\s/.test( name ) ) {
name = name.split(' ');
name = name[0];
}
} else {
name = getRandomName();
el.classList.add( name );
}
return '.' + name + ',';
};
(function() {
'use strict';
if ( window.location.href != top.location.href ) return;
window.addEventListener('load', (event) => {
setTimeout( () => {
var el = document.evaluate("//*[contains(text(),'AdBlock')]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
if ( el !== null ) {
//console.log( 'ANTI-DEBLOCKER: Anti-AdBlock Found!');
let $_removeChild = unsafeWindow.Node.prototype.removeChild;
unsafeWindow.Node.prototype.removeChild = ( node ) => {
if ( node.tagName != 'HEAD' && node.tagName != 'BODY' ) {
$_removeChild.apply( this, arguments );
}
}
var classes = '';
for (;;) {
if ( el.parentNode.tagName == 'BODY' ) break;
classes += addRandomClass( el );
el = el.parentNode;
}
document.querySelectorAll( 'div' ).forEach( ( el ) => {
let style = window.getComputedStyle( el );
let height;
if ( style.getPropertyValue( 'position' ) == 'fixed' )
{
height = style.getPropertyValue( 'height' );
if ( height == '100%' )
{
classes += addRandomClass( el );
}
else if ( /px/i.test( height ) && parseInt( height ) > window.innerHeight - 100 )
{
classes += addRandomClass( el );
}
}
});
classes = classes.substring( 0, classes.length - 1 );
//console.log( 'ANTI-DEBLOCKER Elements:' + classes );
addStyleStr( classes + '{ display: none !important; }' );
addStyleStr( '* { -webkit-filter: blur(0px) !important; filter: blur(0px) !important; }' );
}
}, 1000);
});
})();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址