From 2177d8163e856d3cd21349afae95f8a3b96cb002 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 11 Feb 2022 15:13:25 -0500 Subject: [PATCH] Fix regression breaking `:remove()` Related commit/feedback: - https://github.com/gorhill/uBlock/commit/152120bd9ec7a2ccea907e015fb195484ef7bc8e#commitcomment-66516398 --- src/js/contentscript-extra.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/js/contentscript-extra.js b/src/js/contentscript-extra.js index 20399be96..5c43d721d 100644 --- a/src/js/contentscript-extra.js +++ b/src/js/contentscript-extra.js @@ -334,7 +334,7 @@ class PSelector { ]); } this.raw = o.raw; - this.selector = ':root > :root'; + this.selector = o.selector; this.tasks = []; const tasks = []; if ( Array.isArray(o.tasks) === false ) { return; } @@ -344,7 +344,6 @@ class PSelector { tasks.push(new ctor(task)); } // Initialize only after all tasks have been successfully instantiated - this.selector = o.selector; this.tasks = tasks; } prime(input) {