Skip to content
Permalink
Browse files
Bug 18886: Hide pocket menu items when Pocket is disabled
If the user toggles the value of "browser.pocket.enabled", then menu
items (and pocket button) will be affected only after browser restart.
  • Loading branch information
arthuredelstein committed May 14, 2016
1 parent ec74b17 commit 6844e1209e7c509c8dc67570567e61c38061f72d
Showing with 8 additions and 1 deletion.
  1. +8 −1 browser/base/content/browser-places.js
@@ -1553,7 +1553,14 @@ var BookmarkingUI = {
},

updatePocketItemVisibility: function BUI_updatePocketItemVisibility(prefix) {
let hidden = !CustomizableUI.getPlacementOfWidget("pocket-button");
// When the pocket button has been placed on the navigation bar or
// on the hamburger menu, then Pocket can be considered "active" and
// we should show the pocket menu item in various places.
// If, on the other hand, the pocket button is not present because
// the user has moved it out of the nav bar, or the browser started
// up with "browser.pocket.enabled" set to false, then we
// should not show the pocket menu items.
let hidden = document.getElementById("pocket-button") == null;
document.getElementById(prefix + "pocket").hidden = hidden;
document.getElementById(prefix + "pocketSeparator").hidden = hidden;
},

0 comments on commit 6844e12

Please sign in to comment.