Browse Source

Add `$document` to adblock filter parsing

SukkaW 3 years ago
parent
commit
12bb3bf83a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Build/lib/parse-filter.js

+ 4 - 0
Build/lib/parse-filter.js

@@ -194,12 +194,16 @@ async function processFilterRules (filterRulesUrl, fallbackUrls) {
         lineEndsWithCaret
         || lineEndsWithCaretVerticalBar
         || line.endsWith('^$all')
+        || line.endsWith('^$doc')
+        || line.endsWith('^$document')
       )
     ) {
       const _domain = line
         .replaceAll('||', '')
         .replaceAll('^|', '')
         .replaceAll('^$all', '')
+        .replaceAll('^$document', '')
+        .replaceAll('^$doc', '')
         .replaceAll('^', '')
         .trim();