зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1866616 - Save the current date when starting a search from the search bar. r=dao,search-reviewers,daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D194754
This commit is contained in:
Родитель
781ad0b2f5
Коммит
da80378e0f
|
@ -15,6 +15,7 @@
|
|||
FormHistory: "resource://gre/modules/FormHistory.sys.mjs",
|
||||
SearchSuggestionController:
|
||||
"resource://gre/modules/SearchSuggestionController.sys.mjs",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -425,6 +426,13 @@
|
|||
"searchbar",
|
||||
details
|
||||
);
|
||||
|
||||
// Record when the user uses the search bar
|
||||
lazy.UrlbarPrefs.set(
|
||||
"browser.search.widget.lastUsed",
|
||||
new Date().toISOString()
|
||||
);
|
||||
|
||||
// null parameter below specifies HTML response for search
|
||||
let params = {
|
||||
postData: submission.postData,
|
||||
|
|
|
@ -474,6 +474,9 @@ const PREF_URLBAR_DEFAULTS = new Map([
|
|||
|
||||
// We only show recent searches within the past 31 days by default.
|
||||
["recentsearches.expirationDays", 31],
|
||||
|
||||
// The last time (as ISO string) the user used the search bar.
|
||||
["browser.search.widget.lastUsed", ""],
|
||||
]);
|
||||
|
||||
const PREF_OTHER_DEFAULTS = new Map([
|
||||
|
|
Загрузка…
Ссылка в новой задаче