Code: Select all
PlacesMenu.call(this, aPopupShowingEvent, "place:sort=4&maxResults=15");
P.S. I know about the ability to open history in the sidebar or in a tab. What I'm interested in is the ability to enlarge the drop-down list.
Moderators: FranklinDM, Lootyhoof
Code: Select all
PlacesMenu.call(this, aPopupShowingEvent, "place:sort=4&maxResults=15");
... don't do this. Your extension will likely break the browser with every update that involves changes to browser.js.Enobarbous wrote: ↑2023-05-17, 11:38So far, the only workable option I've found is to modify the browser.js and pack it into a new extension
This is the reason I decided to ask the question)Moonchild wrote: ↑2023-05-17, 11:46... don't do this. Your extension will likely break the browser with every update that involves changes to browser.js.Enobarbous wrote: ↑2023-05-17, 11:38So far, the only workable option I've found is to modify the browser.js and pack it into a new extension
And that's what I tripped over. I tried some ideas, but... In the end, I came to the forum with a questionWhat you can do, however, is create an extension that replaces only what you want using the browser's interfaces.
Or.... if all you want is a 'one click' extended history drop-down menu... why not create a Bookmarklet?Enobarbous wrote:What I'm interested in is the ability to enlarge the drop-down list.
Code: Select all
PlacesMenu.call(this, aPopupShowingEvent, "place:sort=4&maxResults=15");
Code: Select all
place:sort=4&maxResults=30
This is Java.Enobarbous wrote: ↑2023-05-17, 11:58I tried some ideas, but... In the end, I came to the forum with a question
Code: Select all
window.oldHistoryMenu = window.HistoryMenu;
window.HistoryMenu = function (aPopupShowingEvent) {
this.__proto__.__proto__ = window.PlacesMenu.prototype;
window.XPCOMUtils.defineLazyServiceGetter(this, "_ss",
"@mozilla.org/browser/sessionstore;1",
"nsISessionStore");
window.PlacesMenu.call(this, aPopupShowingEvent,
"place:sort=4&maxResults=3");
};
window.HistoryMenu.prototype = window.oldHistoryMenu.prototype;
If one was to ask very, very nicely... always possible Moonchild and Devs might oblige with a lovely hidden pref...Kris_88 wrote:Of course, in a good way, the browser should take this line from preferences.
Thank you very much.
Thanks even more. I even somehow forgot that browser developers can be asked for something...
Huh, I have been poking at this too, and was actually able to get it working too. It was very similar to yours, with the only difference being that I didn't restrict the amount of results and I didn't process the variable holding the int pref with .toString().trim(). The only reason I didn't PR is because I was figuring out how to make it restartless like History Submenus II did. But if you think it's fine requiring a restart (and it's not really a big deal anyway because one wouldn't change this setting constantly), well I guess that's cool!Moonchild wrote: ↑2023-05-18, 07:46Issue #1925
Been poking at it for a little, and it's simple to do.
Indeed it would be set and forget. So a restart is fine.
Well my initial check was a catch-all for too low AND too high values.jobbautista9 wrote: ↑2023-05-18, 09:05So IMO we should just set the variable back to the maximum 50 rather than the default 15.