From f596559103efe4132bab64939ef785d07886e3ad Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 15 Dec 2022 13:12:37 -0500 Subject: [PATCH] Add `options` stub to `nofab` scriptlet Related issue: - https://github.com/uBlockOrigin/uAssets/issues/16010 Related AdGuard commit re. `prevent-fab-3.2.0`: - https://github.com/AdguardTeam/Scriptlets/commit/3bfb9b39e96b13d9457856d073c3a39088f0f05e --- src/web_accessible_resources/nofab.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/web_accessible_resources/nofab.js b/src/web_accessible_resources/nofab.js index 6f30fc200..9e50e0b7a 100644 --- a/src/web_accessible_resources/nofab.js +++ b/src/web_accessible_resources/nofab.js @@ -39,15 +39,19 @@ return this; }; Fab.prototype.setOption = noopfn; - const fab = new Fab(), - getSetFab = { - get: function() { return Fab; }, - set: function() {} - }, - getsetfab = { - get: function() { return fab; }, - set: function() {} - }; + Fab.prototype.options = { + set: noopfn, + get: noopfn, + }; + const fab = new Fab(); + const getSetFab = { + get: function() { return Fab; }, + set: function() {} + }; + const getsetfab = { + get: function() { return fab; }, + set: function() {} + }; if ( window.hasOwnProperty('FuckAdBlock') ) { window.FuckAdBlock = Fab; } else { Object.defineProperty(window, 'FuckAdBlock', getSetFab); } if ( window.hasOwnProperty('BlockAdBlock') ) { window.BlockAdBlock = Fab; }