├── icon.png ├── README.md ├── LICENSE └── anti-adblocker-fuckoff.user.js /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WakeupNeo33/Anti-AdBlocker-Fuckoff-userscript/HEAD/icon.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Anti-AdBlocker-Fuckoff-userscript v1.6.8 2 | 3 | Protects from Anti-AdBlockers & DeBlocker 4 | 5 | ![Image](https://github.com/WakeupNeo33/Anti-AdBlocker-Fuckoff-userscript/raw/main/icon.png) 6 | 7 | https://greasyfork.org/es/scripts/397070-anti-adblocker-off 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 WakeupNeo33 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /anti-adblocker-fuckoff.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name Anti-AdBlocker Fuckoff 3 | // @name:es Anti-AdBlocker Fuckoff 4 | // @namespace Anti-AdBlocker-Fuckoff 5 | // @version 1.68 6 | // @description Protects & Remove Anti-AdBlockers modal windows from web sites 7 | // @description:es Protege y elimina las ventanas modales de Anti-AdBlockers de los sitios web 8 | // @author Elwyn 9 | // @license MIT 10 | // @homepage https://github.com/WakeupNeo33/Anti-AdBlocker-Fuckoff-userscript 11 | // @supportURL https://github.com/WakeupNeo33/Anti-AdBlocker-Fuckoff-userscript/issues 12 | // @iconURL https://github.com/WakeupNeo33/Anti-AdBlocker-Fuckoff-userscript/raw/main/icon.png 13 | // @include * 14 | // @exclude https://*aliexpress.com/* 15 | // @exclude https://*amazon.*/* 16 | // @exclude https://*anaconda.org/* 17 | // @exclude https://*apple.com/* 18 | // @exclude https://*ask.com/* 19 | // @exclude https://*baidu.com/* 20 | // @exclude https://*binance.com/* 21 | // @exclude https://*binance.us/* 22 | // @exclude https://*bing.com/* 23 | // @exclude https://*bitfinex.com/* 24 | // @exclude https://*bitflyer.com/* 25 | // @exclude https://*bitstamp.net/* 26 | // @exclude https://*blockchain.com/* 27 | // @exclude https://*blockchair.com/* 28 | // @exclude https://*blockcypher.com/* 29 | // @exclude https://*bscscan.com/* 30 | // @exclude https://*buffer.com/* 31 | // @exclude https://*bufferapp.com/* 32 | // @exclude https://*calm.com/* 33 | // @exclude https://*chatango.com/* 34 | // @exclude https://*coinbase.com/* 35 | // @exclude https://*coinmarketcap.com/* 36 | // @exclude https://*doctor-groups.com/* 37 | // @exclude https://*duckduckgo.com/* 38 | // @exclude https://*ebay.com/* 39 | // @exclude https://*etherscan.io/* 40 | // @exclude https://*facebook.com/* 41 | // @exclude https://*firefaucet.win/* 42 | // @exclude https://*flattr.com/* 43 | // @exclude https://*flickr.com/* 44 | // @exclude https://*fsf.org/* 45 | // @exclude https://*ftx.com/* 46 | // @exclude https://*ftx.us/* 47 | // @exclude https://*gate.io/* 48 | // @exclude https://*geeksforgeeks.org/* 49 | // @exclude https://*gemini.com/* 50 | // @exclude https://*github.com/* 51 | // @exclude https://*gitlab.com/* 52 | // @exclude https://*google.* 53 | // @exclude https://*greasyfork.org/* 54 | // @exclude https://*huobi.com/* 55 | // @exclude https://*imdb.com/* 56 | // @exclude https://*imgbox.com/* 57 | // @exclude https://*imgur.com/* 58 | // @exclude https://*instagram.com/* 59 | // @exclude https://*jsbin.com/* 60 | // @exclude https://*jsfiddle.net/* 61 | // @exclude https://*kucoin.com/* 62 | // @exclude https://*kraken.com/* 63 | // @exclude https://*linkedin.com/* 64 | // @exclude https://*liquid.com/* 65 | // @exclude https://*live.com/* 66 | // @exclude https://*mail.ru/* 67 | // @exclude https://*mega.nz/* 68 | // @exclude https://*minds.com/* 69 | // @exclude https://*microsoft.com/* 70 | // @exclude https://*msn.com/* 71 | // @exclude https://*netflix.com/* 72 | // @exclude https://*odysee.com/* 73 | // @exclude https://*openuserjs.org/* 74 | // @exclude https://*paypal.com/* 75 | // @exclude https://*pinterest.com/* 76 | // @exclude http*://*plnkr.co/* 77 | // @exclude http*://*poloniex.com/* 78 | // @exclude https://*primevideo.com/* 79 | // @exclude https://*protonmail.com/* 80 | // @exclude https://*qq.com/* 81 | // @exclude https://*raider.io/* 82 | // @exclude https://*reddit.com/* 83 | // @exclude https://*stackoverflow.com/* 84 | // @exclude https://*steampowered.com/* 85 | // @exclude https://*tampermonkey.net/* 86 | // @exclude https://*trello.com/* 87 | // @exclude https://*twitch.tv/* 88 | // @exclude https://*twitter.com/* 89 | // @exclude https://*userstyles.org/* 90 | // @exclude https://*viawallet.com/* 91 | // @exclude https://*vimeo.com/* 92 | // @exclude https://*whatsapp.com/* 93 | // @exclude https://*wikipedia.org/* 94 | // @exclude https://*w3schools.com/* 95 | // @exclude https://*x.com/* 96 | // @exclude https://*yahoo.* 97 | // @exclude https://*yandex.ru/* 98 | // @exclude https://*youtube.com/* 99 | // @exclude https://*vod.pl/* 100 | // @noframes 101 | // @run-at document-start 102 | // @grant unsafeWindow 103 | // @downloadURL https://update.greasyfork.org/scripts/397070/Anti-AdBlocker%20Fuckoff.user.js 104 | // @updateURL https://update.greasyfork.org/scripts/397070/Anti-AdBlocker%20Fuckoff.meta.js 105 | // ==/UserScript== 106 | (function() { 107 | 108 | var enable_debug = false; 109 | 110 | // Anti-AdBlocker Pattern to Search 111 | var adblock_pattern = /ad-block|adblock|ad block|blocking ads|bloqueur|bloqueador|Werbeblocker|آدبلوك بلس|блокировщиком/i; 112 | var disable_pattern = /kapat|disabl|désactiv|desactiv|desativ|deaktiv|detect|enabled|turned off|turn off|απενεργοποίηση|запрещать|állítsd le|publicités|рекламе|verhindert|advert|kapatınız/i; 113 | 114 | var tagNames_pattern = /b|center|div|font|i|iframe|s|span|section|u/i; 115 | 116 | var is_core_protected = false; 117 | 118 | var classes = []; 119 | 120 | // HELPER Functions 121 | //----------------- 122 | function debug( msg, val ) { 123 | if ( !enable_debug ) return; 124 | console.log( '%c ANTI-ADBLOCKER \n','color: white; background-color: red', msg ); 125 | if ( val === undefined ) return; 126 | if ( val.nodeType === Node.ELEMENT_NODE ) 127 | { 128 | console.log ( 'TagName: ' + val.nodeName + ' | Id: ' + val.id + ' | Class: ' + val.classList ); 129 | console.log ( val ); 130 | } else { 131 | console.log ( '%c' +val, 'color: grey;' ); 132 | } 133 | } 134 | 135 | function addStyle(str) { 136 | var style = document.createElement('style'); 137 | style.innerHTML = str; 138 | document.body.appendChild( style ); 139 | } 140 | 141 | function randomInt( min, max ) 142 | { 143 | // min and max included 144 | if ( max === undefined ) { 145 | max = min; 146 | min = 0; 147 | } 148 | return Math.floor(min + Math.random() * (max - min + 1)); 149 | } 150 | 151 | function getRandomName( size ) 152 | { 153 | var charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 154 | var name = ''; 155 | for (var i = 0; i < (size||randomInt(10,20)); ++i) 156 | { 157 | name += charset.charAt( Math.floor( Math.random() * charset.length) ); 158 | } 159 | return name; 160 | } 161 | 162 | function addRandomClass( el ) { 163 | let name = getRandomName(); 164 | el.classList.add( name ); 165 | return name; 166 | } 167 | 168 | function enableRightClick() { 169 | if (typeof jQuery !== 'undefined') { 170 | jQuery(function($) { 171 | $('img').removeAttr('onmousedown').removeAttr('onselectstart').removeAttr('ondragstart'); 172 | $(document).off('contextmenu'); 173 | $(document.body).off('contextmenu'); 174 | $(document.body).off('selectstart'); 175 | $(document.body).off('dragstart'); 176 | }); 177 | } else { 178 | const images = document.querySelectorAll('img'); 179 | images.forEach(img => { 180 | img.removeAttribute('onmousedown'); 181 | img.removeAttribute('onselectstart'); 182 | img.removeAttribute('ondragstart'); 183 | }); 184 | } 185 | document.oncontextmenu=null; 186 | document.onmousedown=null; 187 | document.body.oncontextmenu=null; 188 | document.body.onselectstart=null; 189 | document.body.ondragstart=null; 190 | } 191 | 192 | 193 | 194 | function isElementBlur( el ) 195 | { 196 | if (el instanceof Element) { 197 | var style = window.getComputedStyle( el ); 198 | var filter = style.getPropertyValue( 'filter' ); 199 | return ( (/blur/i).test( filter ) ); 200 | } 201 | } 202 | 203 | function isElementFixed( el ) 204 | { 205 | if (el instanceof Element) { 206 | var style = window.getComputedStyle( el ); 207 | return ( style.getPropertyValue( 'position' ) == 'fixed' ); 208 | } 209 | } 210 | 211 | function isOverflowHidden( el ) 212 | { 213 | if (el instanceof Element) { 214 | var style = window.getComputedStyle( el ); 215 | return ( style.getPropertyValue( 'overflow' ) == 'hidden' ); 216 | } 217 | } 218 | function isNotHidden( el ) 219 | { 220 | if (el instanceof Element) { 221 | var style = window.getComputedStyle( el ); 222 | return ( style.getPropertyValue( 'display' ) != 'none' ); 223 | } 224 | } 225 | 226 | function isBlackoutModal( el ) 227 | { 228 | if (el instanceof Element) { 229 | var style = window.getComputedStyle( el ); 230 | var position = style.getPropertyValue( 'position' ); 231 | var top = parseInt( style.getPropertyValue( 'top' ) ); 232 | var left = parseInt( style.getPropertyValue( 'left' ) ); 233 | var right = parseInt( style.getPropertyValue( 'right' ) ); 234 | var bottom = parseInt( style.getPropertyValue( 'bottom' ) ); 235 | if (position == 'fixed') { 236 | debug ( "Possible Blackout", 237 | "position: " + position + 238 | "\n top: " + top + " left: " + left + 239 | "\n bottom: " + bottom + " right: " + right + 240 | "\n Height: " + (window.innerHeight / el.offsetHeight) + 241 | "\n Width: " + (window.innerWidth / el.offsetWidth) 242 | ); 243 | } 244 | return position == 'fixed' && ( ( (window.innerHeight / el.offsetHeight) > 0.96 && (window.innerWidth / el.offsetWidth) > 0.96 ) && ((top <= 2 && left <= 2) || (right <= 2 && bottom <= 2)) ); 245 | } 246 | } 247 | 248 | function isAntiAdblockText( value ) 249 | { 250 | return adblock_pattern.test( value ) && disable_pattern.test( value ); 251 | } 252 | 253 | function isModalWindows( el ) 254 | { 255 | return isElementFixed ( el ) && ( isAntiAdblockText( el.textContent ) || isBlackoutModal( el ) ); 256 | } 257 | 258 | // Blocks the possibility of being able to remove the BODY or the HEAD 259 | function protectCore() { 260 | if ( is_core_protected ) return; 261 | 262 | if (typeof unsafeWindow === 'undefined') { 263 | const unsafeWindow = window; 264 | } 265 | 266 | // Protect RemoveChild 267 | const $_removeChild = unsafeWindow.Node.prototype.removeChild; 268 | unsafeWindow.Node.prototype.removeChild = function( node ) { 269 | if ( node.nodeName == 'HEAD' || (node.parentNode.nodeName == 'HEAD' && !(/META|SCRIPT|STYLE/.test(node.nodeName)) ) ){ 270 | return debug( 'An attempt to DELETE the element ' + node.nodeName + ' was blocked', node ); 271 | } 272 | else if ( node.nodeName == 'BODY' ){ 273 | if ( node.parentNode == document.body.firstElementChild ) { 274 | return debug( 'An attempt to DELETE the element ' + node.nodeName + ' from ' + node.parentNode.nodeName + ' was blocked', node ); 275 | } 276 | return debug( 'An attempt to DELETE the element ' + node.nodeName + ' was blocked', node ); 277 | } 278 | $_removeChild.apply( this, arguments ); 279 | }; 280 | 281 | // Protect innerHTML 282 | 283 | const $_innerHTML = Object.getOwnPropertyDescriptor(Element.prototype, 'innerHTML'); 284 | Object.defineProperty(Element.prototype, 'innerHTML', { 285 | set: function (value) { 286 | if ( this.nodeName == 'BODY' || isAntiAdblockText( value ) ){ 287 | return debug( 'An attempt to CHANGE the content of the element ' + this.nodeName + ' was blocked\n', value ); 288 | } 289 | //Call the original setter 290 | return $_innerHTML.set.call(this, value); 291 | }, 292 | get: function() { 293 | return $_innerHTML.get.call(this); 294 | }, 295 | configurable: true 296 | }); 297 | 298 | debug( 'Core Protected'); 299 | } 300 | 301 | 302 | function unblockScroll() 303 | { 304 | if ( isOverflowHidden( document.body ) ) 305 | { 306 | document.body.setAttribute('style', (document.body.getAttribute('style')||'').replace('overflow: visible !important;','') + 'overflow: visible !important;'); 307 | document.body.classList.add( 'scroll_on' ); 308 | debug( 'Scroll Unblocked from BODY tag'); 309 | } 310 | if ( isOverflowHidden( document.documentElement ) ) 311 | { 312 | document.documentElement.setAttribute('style', (document.documentElement.getAttribute('style')||'').replace('overflow: visible !important;','') + 'overflow: visible !important;'); 313 | document.documentElement.classList.add( 'scroll_on' ); 314 | debug( 'Scroll Unblocked from HTML tag '); 315 | } 316 | } 317 | 318 | // Main Functions 319 | function removeBackStuff() 320 | { 321 | document.querySelectorAll( 'b,center,div,font,i,iframe,s,span,section,u' ).forEach( ( el ) => { 322 | if ( isBlackoutModal( el ) ) 323 | { 324 | debug( 'Blackout Modal Detected & Removed: ', el); 325 | el.removeAttribute('id'); 326 | el.removeAttribute('class'); 327 | el.setAttribute('style', (el.getAttribute('style')||'') + ';display: none !important;'); 328 | el.classList.add( 'hide_modal' ); 329 | } 330 | else if ( isElementBlur( el ) ) 331 | { 332 | debug( 'Blur Element Detected & Deblurred: ', el); 333 | el.classList.add( 'un_blur' ); 334 | } 335 | }); 336 | setTimeout( unblockScroll, 500); 337 | } 338 | 339 | function checkModals() 340 | { 341 | debug( 'Checking Modals' ); 342 | var modalFound = false; 343 | // Only check common used html tag names 344 | document.querySelectorAll( 'b,center,div,font,i,iframe,s,span,section,u' ).forEach( ( el ) => { 345 | if ( isModalWindows( el ) && isNotHidden( el ) ) 346 | { 347 | modalFound = true; 348 | removeModal( el ); 349 | } 350 | }); 351 | 352 | if ( modalFound ) 353 | { 354 | setTimeout( removeBackStuff, 150); 355 | } 356 | } 357 | 358 | function removeModal( el, isNew ) 359 | { 360 | // Skip the already processed elements 361 | if ( (new RegExp(classes.join('|'))).test( el.classList ) ) { 362 | //debug( 'Modal already added : ', el ); 363 | return; 364 | } 365 | 366 | el.removeAttribute('id'); 367 | el.removeAttribute('class'); 368 | 369 | // Definde a random class name to hide the element 370 | // ( so that it is not so easy to detect the class name ) 371 | var class_name = ''; 372 | class_name = addRandomClass( el ); 373 | classes.push( class_name ); 374 | 375 | // Hide the element through a high priority incorporating the sentence in the style parameter 376 | el.setAttribute('style', (el.getAttribute('style')||'') + ';display: none !important;'); 377 | 378 | // Also, add the random class name to the element 379 | // (in case there is a script that eliminates the previous statement) 380 | addStyle( '.' + class_name + '{ display: none !important; }' ); 381 | 382 | debug( 'Modal Detected & Removed: ', el); 383 | 384 | if ( isNew ) 385 | { 386 | setTimeout( removeBackStuff, 150); 387 | } 388 | } 389 | 390 | window.addEventListener('DOMContentLoaded', (event) => { 391 | 392 | 393 | classes.push( getRandomName() ); 394 | 395 | //document.html = document.getElementsByTagName('html')[0]; 396 | 397 | // Mutation Observer 398 | var MutationObserver = window.MutationObserver || window.WebKitMutationObserver; 399 | 400 | // Create an observer instance 401 | var observer = new MutationObserver( (mutations) => { 402 | mutations.forEach( (mutation) => { 403 | if ( mutation.addedNodes.length ) { 404 | Array.prototype.forEach.call( mutation.addedNodes, ( el ) => { 405 | // skip unusual html tag names 406 | if ( !tagNames_pattern.test ( el.tagName ) ) return; 407 | 408 | // Check if element is an Anti-Adblock Modal Windows 409 | if ( isModalWindows( el ) && isNotHidden( el ) ) 410 | { 411 | debug( 'OnMutationObserver: ', el ); 412 | removeModal( el, true ); 413 | } 414 | }); 415 | } 416 | }); 417 | }); 418 | // Observer 419 | // Observe only the body and its direct descendants 420 | observer.observe(document.body, { 421 | childList : true, 422 | subtree : true 423 | }); 424 | 425 | 426 | // First check with a little delay 427 | setTimeout( function() { 428 | // check Modals 429 | checkModals(); 430 | }, 150 ); 431 | 432 | addStyle( 'body { user-select: auto !important; } body.scroll_on, html.scroll_on { overflow: visible !important; } .hide_modal { display: none !important; } .un_blur { -webkit-filter: blur(0px) !important; filter: blur(0px) !important; }' ); 433 | 434 | }); 435 | 436 | window.addEventListener('load', (event) => { 437 | // Second check, when page is complete loaded ( just in case ) 438 | setTimeout( function() { 439 | // enable RightClick again 440 | enableRightClick(); 441 | // check Modals 442 | checkModals(); 443 | }, 1500 ); 444 | }); 445 | 446 | 447 | // Protect Core Functions 448 | protectCore(); 449 | 450 | })(); 451 | --------------------------------------------------------------------------------