diff --git a/application/palemoon/base/content/browser-places.js b/application/palemoon/base/content/browser-places.js index 4283ad25c2..e3508ef553 100644 --- a/application/palemoon/base/content/browser-places.js +++ b/application/palemoon/base/content/browser-places.js @@ -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 = {