Skip to content

Commit

Permalink
Hide "add rule" button if allowAddRules is false
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jul 25, 2024
1 parent 3a29146 commit 1fb882d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webextensions/options/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ function rebuildUserRulesUI() {
setUserRuleFieldValue(`#userRule-ui-confirmTitle\\:${id}`, rule.confirmTitle);
setUserRuleFieldValue(`#userRule-ui-confirmMessage\\:${id}`, rule.confirmMessage);
}

document.querySelector('#userRulesAddButtonContainer').classList.toggle('hidden', !configs.allowAddRules);
}

function throttledRebuildUserRulesUI() {
Expand Down

0 comments on commit 1fb882d

Please sign in to comment.