Skip to content

Commit

Permalink
Bug 1828939 - Remove Share URL menu item when MOZ_PROXY_BYPASS_PROTEC…
Browse files Browse the repository at this point in the history
…TION and restore Share by Email. r=mossop

Differential Revision: https://phabricator.services.mozilla.com/D175941

UltraBlame original commit: 9b50848171bfd9bece2d75c4aa9d1f4a024827a9
  • Loading branch information
marco-c committed May 31, 2023
1 parent 0b580d4 commit 0ebbd01
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions browser/app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2786,6 +2786,11 @@ pref("first-startup.timeout", 30000);
#endif


#ifdef MOZ_PROXY_BYPASS_PROTECTION
pref("browser.menu.share_url.allow", false);
#endif





Expand Down
2 changes: 1 addition & 1 deletion browser/base/content/browser-menubar.inc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<menuitem id="menu_savePage"
key="key_savePage"
command="Browser:SavePage" data-l10n-id="menu-file-save-page"/>
#ifndef XP_MACOSX
#if !defined(XP_MACOSX) || defined(MOZ_PROXY_BYPASS_PROTECTION)
<menuitem id="menu_sendLink"
command="Browser:SendLink" data-l10n-id="menu-file-email-link"/>
#endif
Expand Down
4 changes: 4 additions & 0 deletions browser/base/content/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4737,6 +4737,10 @@ let gShareUtils = {


updateShareURLMenuItem(browser, insertAfterEl) {
if (!Services.prefs.getBoolPref("browser.menu.share_url.allow", true)) {
return;
}


if (
AppConstants.platform != "macosx" &&
Expand Down

0 comments on commit 0ebbd01

Please sign in to comment.