├── .gitignore ├── LICENSE ├── README.md └── blockblockadblock.user.js /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /blockadblock.* 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | BlockBlockAdBlock 2 | ================= 3 | 4 | This simple userscript will block BlockAdBlock from running. Just install it using [Tampermonkey][tampermonkey] 5 | (chrome) or [Greasemonkey][greasemonkey] (Firefox) by clicking [here][raw]. You can try it out on 6 | [the BlockAdblock website][blockadblock]. [It's kinda like a trace buster buster][tracebusterbuster]. 7 | 8 | Also check out [FuckFuckAdBlock][FuckFuckAdBlock]. 9 | 10 | ## Unreliable in chrome and safari 11 | This is due to the fact that the `.toSource()` method in those browsers is terrible and they should be ashamed. Instead 12 | I'm using a method that is not as reliable. 13 | 14 | ## This script will only counter [BlockAdBlock.js][blockadblock] and is not a general purpose anti-anti-adblocker 15 | 16 | 17 | [blockadblock]: https://blockadblock.com 18 | [tracebusterbuster]: http://www.youtube.com/watch?v=Iw3G80bplTg 19 | [tampermonkey]: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo 20 | [greasemonkey]: https://addons.mozilla.org/nl/firefox/addon/greasemonkey/ 21 | [raw]: https://github.com/Mechazawa/BlockBlockAdBlock/raw/master/blockblockadblock.user.js 22 | [fuckfuckadblock]: https://github.com/Mechazawa/FuckFuckAdBlock 23 | -------------------------------------------------------------------------------- /blockblockadblock.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name blockblockadblock 3 | // @description Blocks BlockAdBlock.js from running 4 | // @namespace Mechazawa 5 | // @author Mechazawa 6 | // @include * 7 | // @version 4 8 | // @license Unlicense 9 | // @updateURL https://github.com/Mechazawa/BlockBlockAdBlock/raw/master/BlockBlockAdBlock.user.js 10 | // @run-at document-start 11 | // @grant none 12 | // ==/UserScript== 13 | 14 | 15 | 16 | // I have a bunch more ways of detecting it in case this method ever gets blocked 17 | (function(window) { 18 | var windowKeysDefault = Object.keys(window); 19 | var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; 20 | 21 | var pivot = 'Ly93d3cuZ29vZ2xlLmNvbS9hZHNlbnNlL3N0YXJ0L2ltYWdlcy9mYXZpY29uLmljbw=='; 22 | 23 | document.addEventListener('DOMContentLoaded', function() { 24 | var windowKeysSuspect = Object.keys(window) 25 | .filter(function(x){return windowKeysDefault.indexOf(x) === -1 && x.length == 12;}); 26 | 27 | for(var i = 0; i < windowKeysSuspect.length; i++) { 28 | var suspectName = windowKeysSuspect[i]; 29 | 30 | if(isFirefox) { 31 | var suspect = window[suspectName]; 32 | var suspectKeys = Object.keys(suspect); 33 | var found = false; 34 | 35 | for (var ii in suspectKeys) { 36 | var source = suspect[suspectKeys[ii]].toSource(); 37 | found = source.indexOf(pivot) !== -1; 38 | 39 | if (found) break; 40 | } 41 | } else { 42 | found = /\D\d\D/.exec(suspectName) !== null; 43 | } 44 | 45 | if(found) { 46 | console.log('Found BlockAdBlock with name ' + suspectName); 47 | delete window[suspectName]; 48 | } 49 | } 50 | }); 51 | })(window); 52 | --------------------------------------------------------------------------------