From d23dad199027395adfcee8126d8ed2941881fb66 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Wed, 21 Aug 2024 05:10:56 +0530 Subject: [PATCH] feat: initialize ad-blocker --- maxun-core/src/interpret.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maxun-core/src/interpret.ts b/maxun-core/src/interpret.ts index 101a9d61..e1dc5bbe 100644 --- a/maxun-core/src/interpret.ts +++ b/maxun-core/src/interpret.ts @@ -81,6 +81,12 @@ export default class Interpreter extends EventEmitter { oldLog(...args); }; } + + PlaywrightBlocker.fromPrebuiltAdsAndTracking(fetch).then((blocker) => { + this.blocker = blocker; + }).catch((err) => { + this.log(`Failed to initialize ad-blocker:`, Level.ERROR); + }) } /**