mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
[Pale-Moon] Issue #1925 - Add pref to control history menu length.
Limits set are minimum 1 entry (0 would mean unlimited so this can't be used to completely remove the history list from the menu) and maximum 50 which would overflow on most screens anyway. Default remains 15 if undefined. Resolves #1925
This commit is contained in:
parent
2a7ff7ce1a
commit
e3d51b39b6
1 changed files with 6 additions and 1 deletions
|
|
@ -504,8 +504,13 @@ function HistoryMenu(aPopupShowingEvent) {
|
|||
XPCOMUtils.defineLazyServiceGetter(this, "_ss",
|
||||
"@mozilla.org/browser/sessionstore;1",
|
||||
"nsISessionStore");
|
||||
let maxResults = Services.prefs.getIntPref("browser.history.menuMaxResults",15);
|
||||
if (maxResults < 1 || maxResults > 50) {
|
||||
// Return to sanity...
|
||||
maxResults = 15;
|
||||
}
|
||||
PlacesMenu.call(this, aPopupShowingEvent,
|
||||
"place:sort=4&maxResults=15");
|
||||
"place:sort=4&maxResults=" + maxResults.toString().trim());
|
||||
}
|
||||
|
||||
HistoryMenu.prototype = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue