diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /browser/components/urlbar/UrlbarProviderInputHistory.sys.mjs | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/urlbar/UrlbarProviderInputHistory.sys.mjs')
-rw-r--r-- | browser/components/urlbar/UrlbarProviderInputHistory.sys.mjs | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/browser/components/urlbar/UrlbarProviderInputHistory.sys.mjs b/browser/components/urlbar/UrlbarProviderInputHistory.sys.mjs index 17b6a4c9b0..a259d639cc 100644 --- a/browser/components/urlbar/UrlbarProviderInputHistory.sys.mjs +++ b/browser/components/urlbar/UrlbarProviderInputHistory.sys.mjs @@ -144,15 +144,25 @@ class ProviderInputHistory extends UrlbarProvider { // Don't suggest switching to the current page. continue; } - let result = new lazy.UrlbarResult( - UrlbarUtils.RESULT_TYPE.TAB_SWITCH, - UrlbarUtils.RESULT_SOURCE.TABS, - ...lazy.UrlbarResult.payloadAndSimpleHighlights(queryContext.tokens, { + let payload = lazy.UrlbarResult.payloadAndSimpleHighlights( + queryContext.tokens, + { url: [url, UrlbarUtils.HIGHLIGHT.TYPED], title: [resultTitle, UrlbarUtils.HIGHLIGHT.TYPED], icon: UrlbarUtils.getIconForUrl(url), userContextId: row.getResultByName("userContextId") || 0, - }) + } + ); + if (lazy.UrlbarPrefs.get("secondaryActions.featureGate")) { + payload[0].action = { + key: "tabswitch", + l10nId: "urlbar-result-action-switch-tab", + }; + } + let result = new lazy.UrlbarResult( + UrlbarUtils.RESULT_TYPE.TAB_SWITCH, + UrlbarUtils.RESULT_SOURCE.TABS, + ...payload ); addCallback(this, result); continue; |