mirror of
http://git.mos6581.com/ManchildProductions/Male-Poon.git
synced 2026-05-26 15:37:33 +00:00
Merge branch 'master' of https://github.com/MoonchildProductions/Pale-Moon
This commit is contained in:
@@ -468,7 +468,9 @@ pref("browser.tabs.showAudioPlayingIcon", true);
|
||||
pref("browser.tabs.delayHidingAudioPlayingIconMS", 3000);
|
||||
|
||||
pref("browser.allTabs.previews", true);
|
||||
pref("browser.allTabs.hidePinnedTabs", false);
|
||||
pref("browser.ctrlTab.previews", true);
|
||||
pref("browser.ctrlTab.hidePinnedTabs", false);
|
||||
pref("browser.ctrlTab.recentlyUsedLimit", 7);
|
||||
|
||||
// By default, do not export HTML at shutdown.
|
||||
|
||||
@@ -216,6 +216,15 @@ var ctrlTab = {
|
||||
}
|
||||
}
|
||||
|
||||
let hidePinnedTabs = gPrefService.getBoolPref("browser.ctrlTab.hidePinnedTabs");
|
||||
if (hidePinnedTabs) {
|
||||
regularTabsList = list.filter(function (tab) !tab.pinned);
|
||||
// Don't hide pinned tabs if we only have 1 regular tab
|
||||
if (regularTabsList.length > 1) {
|
||||
list = regularTabsList;
|
||||
}
|
||||
}
|
||||
|
||||
return this._tabList = list;
|
||||
},
|
||||
|
||||
@@ -649,6 +658,15 @@ var allTabs = {
|
||||
|
||||
this._currentFilter = this.filterField.value;
|
||||
|
||||
let hidePinnedTabs = gPrefService.getBoolPref("browser.allTabs.hidePinnedTabs");
|
||||
if (hidePinnedTabs) {
|
||||
let regularTabsList = Array.filter(this.previews, function (preview) !preview._tab.pinned);
|
||||
// Show pinned tabs if we don't have any regular tabs
|
||||
if (regularTabsList.length == 0) {
|
||||
hidePinnedTabs = false;
|
||||
}
|
||||
}
|
||||
|
||||
var filter = this._currentFilter.split(/\s+/g);
|
||||
this._visible = 0;
|
||||
Array.forEach(this.previews, function (preview) {
|
||||
@@ -663,7 +681,7 @@ var allTabs = {
|
||||
for (let i = 0; i < filter.length; i++)
|
||||
matches += tabstring.includes(filter[i]);
|
||||
}
|
||||
if (matches < filter.length || tab.hidden) {
|
||||
if (matches < filter.length || tab.hidden || (hidePinnedTabs && tab.pinned)) {
|
||||
preview.hidden = true;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
Components.utils.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
||||
var Ci = Components.interfaces;
|
||||
|
||||
var gSetBackground = {
|
||||
|
||||
Reference in New Issue
Block a user