From fcc77e7c9245621917f2f010d8b8e2d09394a80b Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sun, 25 Feb 2024 20:39:21 -0500 Subject: [PATCH] [mv3] Add ability to manually add filters to a ruleset --- platform/mv3/make-rulesets.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/mv3/make-rulesets.js b/platform/mv3/make-rulesets.js index 59ed88f0f..bf6bfed45 100644 --- a/platform/mv3/make-rulesets.js +++ b/platform/mv3/make-rulesets.js @@ -996,6 +996,10 @@ async function rulesetFromURLs(assetDetails) { assetDetails.text = text; } + if ( Array.isArray(assetDetails.filters) ) { + assetDetails.text += '\n' + assetDetails.filters.join('\n'); + } + const extensionPaths = []; for ( const [ fname, details ] of redirectResourcesMap ) { const path = `/web_accessible_resources/${fname}`; @@ -1169,6 +1173,8 @@ async function main() { urls: contentURLs, dnrURL: 'https://ublockorigin.github.io/uAssets/dnr/default.json', homeURL: 'https://github.com/uBlockOrigin/uAssets', + filters: [ + ], }); // Regional rulesets