mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-05 23:07:31 +09:00
Merge remote-tracking branch 'origin/master' into custom
This commit is contained in:
commit
a60c742310
14 changed files with 33 additions and 308 deletions
|
|
@ -216,6 +216,24 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
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 +667,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 +690,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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue