From 0862e0a56d9be00be6d387de2ae21167d930c5e4 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 11 Jan 2016 13:10:43 -0500 Subject: [PATCH] updated forbes-defuser.js --- assets/checksums.txt | 2 +- assets/ublock/resources.txt | 41 ++++++++++++++++++++++++++----------- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 6e64d2f60..a0fb8d684 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -5,7 +5,7 @@ a79f4ceb3bc197dcbe437f44af375bbd assets/ublock/filters.txt 146704ad1c0393e342afdb416762c183 assets/ublock/badware.txt 5baa90e2da7cd6a73edff2010557ee57 assets/ublock/redirect.txt f9bb491dbba453752199e8378ee152bb assets/ublock/experimental.txt -67ddf6f042de8c352ff324351aefd5c0 assets/ublock/resources.txt +84d7c7008ec4f8648fb0ca6a564ae6e1 assets/ublock/resources.txt 66229baa2c66a144eb87a5420ad64bc5 assets/ublock/filter-lists.json 50573388b525ede1a920cd4b4ee7fbf0 assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt 61cc16cf02e034370f0f47bc17c46551 assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt diff --git a/assets/ublock/resources.txt b/assets/ublock/resources.txt index fa36e5f34..cf4a4a4ea 100644 --- a/assets/ublock/resources.txt +++ b/assets/ublock/resources.txt @@ -417,18 +417,35 @@ forbes-defuser.js application/javascript if ( !window.location.pathname.startsWith('/forbes/welcome/') ) { return; } - if ( typeof window.fbs_settings === 'object' ) { - window.fbs_settings.classes = 'W10='; - window.fbs_settings.mobile = 'true'; - return; - } - Object.defineProperty(window, 'fbs_settings', { - value: { - classes: 'W10=', - data: { - title: '' - }, - mobile: 'true' + var noopfn = function() { + ; + }; + var odp = Object.defineProperty; + var wad, wadm, abc = function() {}; + var abcp = abc.prototype; + abcp.addCheck = abcp.check = abcp.initialize = + abcp.removeCheck = abcp.triggerAdBlockState = noopfn; + abcp.getAdBlockState = function() { + return false; + }; + odp(window, 'WelcomeAd', { + get: function() { return wad; }, + set: function(a) { + wad = a; + odp(a, 'Modules', { + get: function() { return wadm; }, + set: function(a) { + wadm = a; + if ( a.AdBlockChecker ) { + a.AdBlockChecker = abc; + } else { + odp(a, 'AdBlockChecker', { + get: function() { return abc; }, + set: function() {} + }); + } + } + }); } }); })();