mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-26 00:57:30 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
787a64cf9d
1 changed files with 18 additions and 5 deletions
|
|
@ -642,8 +642,9 @@ var PlacesCommandHook = {
|
||||||
updateBookmarkAllTabsCommand:
|
updateBookmarkAllTabsCommand:
|
||||||
function PCH_updateBookmarkAllTabsCommand() {
|
function PCH_updateBookmarkAllTabsCommand() {
|
||||||
// There's nothing to do in non-browser windows.
|
// There's nothing to do in non-browser windows.
|
||||||
if (window.location.href != getBrowserURL())
|
if (!window.location || window.location.href != getBrowserURL()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Disable "Bookmark All Tabs" if there are less than two
|
// Disable "Bookmark All Tabs" if there are less than two
|
||||||
// "unique current pages".
|
// "unique current pages".
|
||||||
|
|
@ -717,10 +718,22 @@ function HistoryMenu(aPopupShowingEvent) {
|
||||||
// Defining the prototype inheritance in the prototype itself would cause
|
// Defining the prototype inheritance in the prototype itself would cause
|
||||||
// browser.js to halt on "PlacesMenu is not defined" error.
|
// browser.js to halt on "PlacesMenu is not defined" error.
|
||||||
this.__proto__.__proto__ = PlacesMenu.prototype;
|
this.__proto__.__proto__ = PlacesMenu.prototype;
|
||||||
PlacesMenu.call(this, aPopupShowingEvent,
|
let maxResults = Services.prefs.getIntPref("browser.history.menuMaxResults", 15);
|
||||||
"place:sort=4&maxResults=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 = {
|
HistoryMenu.prototype = {
|
||||||
_getClosedTabCount() {
|
_getClosedTabCount() {
|
||||||
// SessionStore doesn't track the hidden window, so just return zero then.
|
// SessionStore doesn't track the hidden window, so just return zero then.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue