Skip to content

Commit

Permalink
[fix] menu: add option "block all requests from <origin>"
Browse files Browse the repository at this point in the history
Fixes #559
  • Loading branch information
myrdd committed Aug 14, 2016
1 parent a7e7a7b commit 1d2cd54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Note: ChangeLogs for the source code and unit tests, both not relevant for
* minor changes
* Don't change the font color in RP's context menu entry (#31).
* Ignore clicks on `[no origin]` in the menu (#761).
* In default-allow mode, add the menu option
"Block all requests from <origin domain>" (#559).


#### Version 1.0.beta12.3
Expand Down
11 changes: 4 additions & 7 deletions src/content/ui/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,10 @@ window.rpcontinued.menu = (function() {

if (!self._currentlySelectedDest) {
if (Prefs.isDefaultAllow()) {
// It seems pretty rare that someone will want to add a rule to block all
// requests from a given origin.
//if (mayPermRulesBeAdded === true) {
// var item = self._addMenuItemDenyOrigin(
// lists.addRules, ruleData);
//}
//var item = self._addMenuItemTempDenyOrigin(lists.addRules, ruleData);
if (mayPermRulesBeAdded === true) {
self._addMenuItemDenyOrigin(lists.addRules, ruleData);
}
self._addMenuItemTempDenyOrigin(lists.addRules, ruleData);
} else {
if (mayPermRulesBeAdded === true) {
self._addMenuItemAllowOrigin(lists.addRules, ruleData);
Expand Down

0 comments on commit 1d2cd54

Please sign in to comment.