Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2023-06-02 10:39:38 +08:00
commit 0c3fa71099
7 changed files with 52 additions and 7 deletions

View file

@ -504,8 +504,22 @@ function HistoryMenu(aPopupShowingEvent) {
XPCOMUtils.defineLazyServiceGetter(this, "_ss",
"@mozilla.org/browser/sessionstore;1",
"nsISessionStore");
PlacesMenu.call(this, aPopupShowingEvent,
"place:sort=4&maxResults=15");
let maxResults = Services.prefs.getIntPref("browser.history.menuMaxResults", 15);
if (maxResults < 0) {
Components.utils.reportError("Maximum number of history menu entries is invalid! Using defaults.");
maxResults = 15;
}
if (maxResults > 0) {
if (maxResults > 50) {
// Return to sanity...
Components.utils.reportError("Maximum number of history menu entries is too large! Capping to 50.");
maxResults = 50;
}
PlacesMenu.call(this, aPopupShowingEvent,
"place:sort=4&maxResults=" + maxResults.toString().trim());
} else {
// maxResults == 0; do nothing. This suppresses the history entries.
}
}
HistoryMenu.prototype = {

View file

@ -21,7 +21,6 @@ pref("@GUAO_PREF@.addons.mozilla.org","Mozilla/5.0 (%OS_SLICE% rv:@GRE_VERSION@)
// Required for domains that are unresponsive to requests from users (or likely to be)
pref("@GUAO_PREF@.aol.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)");
pref("@GUAO_PREF@.bing.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)");
pref("@GUAO_PREF@.chase.com","Mozilla/5.0 (%OS_SLICE% rv:79.0) @GK_SLICE@ Firefox/79.0");
pref("@GUAO_PREF@.dropbox.com","Mozilla/5.0 (%OS_SLICE% rv:68.9) @GK_SLICE@ Firefox/68.9 (Pale Moon)");
pref("@GUAO_PREF@.instagram.com","Mozilla/5.0 (%OS_SLICE% rv:68.0) @GK_SLICE@ Firefox/68.0");
pref("@GUAO_PREF@.kroger.com","Mozilla/5.0 (%OS_SLICE% rv:86.0) @GK_SLICE@ Firefox/86.0 (Pale Moon)");
@ -60,6 +59,7 @@ pref("@GUAO_PREF@.zoho.com","Mozilla/5.0 (%OS_SLICE% rv:@GRE_VERSION@) @GRE_DATE
pref("@GUAO_PREF@.humblebundle.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)");
pref("@GUAO_PREF@.privat24.ua","Mozilla/5.0 (%OS_SLICE% rv:38.0) @GK_SLICE@ Firefox/38.0");
pref("@GUAO_PREF@.citi.com","Mozilla/5.0 (%OS_SLICE% rv:68.0) @GK_SLICE@ Firefox/68.0 SeaMonkey/2.53.12");
pref("@GUAO_PREF@.chase.com","Mozilla/5.0 (%OS_SLICE% rv:112.0) @GK_SLICE@ Firefox/112.0");
pref("@GUAO_PREF@.facebook.com","Mozilla/5.0 (%OS_SLICE% rv:68.0) @GK_SLICE@ Firefox/68.0 @PM_SLICE@");
pref("@GUAO_PREF@.netflix.com","Mozilla/5.0 (Windows NT 6.1; rv:45.9) @GK_SLICE@ Firefox/45.9");
pref("@GUAO_PREF@.netflximg.net","Mozilla/5.0 (Windows NT 6.1; rv:45.9) @GK_SLICE@ Firefox/45.9");