summaryrefslogtreecommitdiffstats
path: root/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/urlbar/UrlbarProviderPlaces.sys.mjs')
-rw-r--r--browser/components/urlbar/UrlbarProviderPlaces.sys.mjs22
1 files changed, 15 insertions, 7 deletions
diff --git a/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs b/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs
index c94ebee80a..0787d4c209 100644
--- a/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs
+++ b/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs
@@ -330,17 +330,25 @@ function makeUrlbarResult(tokens, info) {
action.params.searchSuggestion.toLocaleLowerCase(),
})
);
- case "switchtab":
+ case "switchtab": {
+ let payload = lazy.UrlbarResult.payloadAndSimpleHighlights(tokens, {
+ url: [action.params.url, UrlbarUtils.HIGHLIGHT.TYPED],
+ title: [info.comment, UrlbarUtils.HIGHLIGHT.TYPED],
+ icon: info.icon,
+ userContextId: info.userContextId,
+ });
+ if (lazy.UrlbarPrefs.get("secondaryActions.featureGate")) {
+ payload[0].action = {
+ key: "tabswitch",
+ l10nId: "urlbar-result-action-switch-tab",
+ };
+ }
return new lazy.UrlbarResult(
UrlbarUtils.RESULT_TYPE.TAB_SWITCH,
UrlbarUtils.RESULT_SOURCE.TABS,
- ...lazy.UrlbarResult.payloadAndSimpleHighlights(tokens, {
- url: [action.params.url, UrlbarUtils.HIGHLIGHT.TYPED],
- title: [info.comment, UrlbarUtils.HIGHLIGHT.TYPED],
- icon: info.icon,
- userContextId: info.userContextId,
- })
+ ...payload
);
+ }
case "visiturl":
return new lazy.UrlbarResult(
UrlbarUtils.RESULT_TYPE.URL,