summaryrefslogtreecommitdiffstats
path: root/application/basilisk/base/content/nsContextMenu.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-03-29 16:04:01 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-03-29 16:04:01 +0100
commit88083f8c683c18f4de68a20c863a82a9da65db8f (patch)
tree926656892d9d80260da02ea8ea71031b140c51df /application/basilisk/base/content/nsContextMenu.js
parentf999f544aad04069b03704d994a99352263f600b (diff)
parent843e4ceffd6ce21a6e6db37419335eafdc543e18 (diff)
downloadUXP-88083f8c683c18f4de68a20c863a82a9da65db8f.tar
UXP-88083f8c683c18f4de68a20c863a82a9da65db8f.tar.gz
UXP-88083f8c683c18f4de68a20c863a82a9da65db8f.tar.lz
UXP-88083f8c683c18f4de68a20c863a82a9da65db8f.tar.xz
UXP-88083f8c683c18f4de68a20c863a82a9da65db8f.zip
Merge branch 'master' into Sync-weave
Diffstat (limited to 'application/basilisk/base/content/nsContextMenu.js')
-rw-r--r--application/basilisk/base/content/nsContextMenu.js34
1 files changed, 2 insertions, 32 deletions
diff --git a/application/basilisk/base/content/nsContextMenu.js b/application/basilisk/base/content/nsContextMenu.js
index 3f77dcb90..74a2e7a8e 100644
--- a/application/basilisk/base/content/nsContextMenu.js
+++ b/application/basilisk/base/content/nsContextMenu.js
@@ -4,7 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-Components.utils.import("resource://gre/modules/ContextualIdentityService.jsm");
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm");
Components.utils.import("resource://gre/modules/LoginManagerContextMenu.jsm");
@@ -142,28 +141,11 @@ nsContextMenu.prototype = {
this.onPlainTextLink = true;
}
- var inContainer = false;
- if (gContextMenuContentData.userContextId) {
- inContainer = true;
- var item = document.getElementById("context-openlinkincontainertab");
-
- item.setAttribute("data-usercontextid", gContextMenuContentData.userContextId);
-
- var label =
- ContextualIdentityService.getUserContextLabel(gContextMenuContentData.userContextId);
- item.setAttribute("label",
- gBrowserBundle.formatStringFromName("userContextOpenLink.label",
- [label], 1));
- }
-
var shouldShow = this.onSaveableLink || isMailtoInternal || this.onPlainTextLink;
var isWindowPrivate = PrivateBrowsingUtils.isWindowPrivate(window);
- var showContainers = Services.prefs.getBoolPref("privacy.userContext.enabled");
this.showItem("context-openlink", shouldShow && !isWindowPrivate);
this.showItem("context-openlinkprivate", shouldShow);
- this.showItem("context-openlinkintab", shouldShow && !inContainer);
- this.showItem("context-openlinkincontainertab", shouldShow && inContainer);
- this.showItem("context-openlinkinusercontext-menu", shouldShow && !isWindowPrivate && showContainers);
+ this.showItem("context-openlinkintab", shouldShow);
this.showItem("context-openlinkincurrent", this.onPlainTextLink);
this.showItem("context-sep-open", shouldShow);
},
@@ -958,13 +940,6 @@ nsContextMenu.prototype = {
params[p] = extra[p];
}
- // If we want to change userContextId, we must be sure that we don't
- // propagate the referrer.
- if ("userContextId" in params &&
- params.userContextId != gContextMenuContentData.userContextId) {
- params.noReferrer = true;
- }
-
return params;
},
@@ -982,7 +957,7 @@ nsContextMenu.prototype = {
},
// Open linked-to URL in a new tab.
- openLinkInTab: function(event) {
+ openLinkInTab: function() {
urlSecurityCheck(this.linkURL, this.principal);
let referrerURI = gContextMenuContentData.documentURIObject;
@@ -1003,7 +978,6 @@ nsContextMenu.prototype = {
let params = {
allowMixedContent: persistAllowMixedContentInChildTab,
- userContextId: parseInt(event.target.getAttribute('data-usercontextid')),
};
openLinkIn(this.linkURL, "tab", this._openLinkInParameters(params));
@@ -1779,8 +1753,4 @@ nsContextMenu.prototype = {
menuItem.label = menuLabel;
menuItem.accessKey = gNavigatorBundle.getString("contextMenuSearch.accesskey");
},
- createContainerMenu: function(aEvent) {
- return createUserContextMenu(aEvent, true,
- gContextMenuContentData.userContextId);
- },
};