mr feedback

This commit is contained in:
Jorrin
2024-01-25 19:25:44 +01:00
parent a2647a58d6
commit 65ff4ab91a
2 changed files with 25 additions and 24 deletions

View File

@@ -108,3 +108,10 @@ export const setDynamicRules = async (body: DynamicRule) => {
if (browser.runtime.lastError?.message) throw new Error(browser.runtime.lastError.message);
}
};
export const removeDynamicRules = async (ruleIds: number[]) => {
await (chrome || browser).declarativeNetRequest.updateDynamicRules({
removeRuleIds: ruleIds,
});
if ((chrome || browser).runtime.lastError?.message) throw new Error((chrome || browser).runtime.lastError.message);
};