@@ -27,6 +27,7 @@ function TabList(props) {
2727
2828  this . _compactModeMode  =  parseInt ( this . _props . prefs . compactModeMode ) ; 
2929  this . _compactPins  =  this . _props . prefs . compactPins ; 
30+   this . _showHidden  =  this . _props . prefs . showHidden ; 
3031  this . _setupListeners ( ) ; 
3132
3233  if  ( browser . browserSettings . closeTabsByDoubleClick )  {  // Introduced in Firefox 61. 
@@ -87,6 +88,9 @@ TabList.prototype = {
8788    if  ( changes . compactPins )  { 
8889      this . _compactPins  =  changes . compactPins . newValue ; 
8990    } 
91+     if  ( changes . showHidden )  { 
92+       this . _showHidden  =  changes . showHidden . newValue ; 
93+     } 
9094    this . _maybeShrinkTabs ( ) ; 
9195  } , 
9296  _onBrowserTabCreated ( tab )  { 
@@ -135,7 +139,7 @@ TabList.prototype = {
135139    this . _shiftTabsIndexes ( direction ,  start ,  end ) ; 
136140    tab . index  =  toIndex ; 
137141
138-     if  ( tab . hidden )  { 
142+     if  ( tab . hidden   &&   ! this . _showHidden )  { 
139143      return ; 
140144    } 
141145
@@ -151,7 +155,7 @@ TabList.prototype = {
151155      return ; 
152156    } 
153157    if  ( changeInfo . hasOwnProperty ( "hidden" ) )  { 
154-       if  ( changeInfo . hidden )  { 
158+       if  ( changeInfo . hidden   &&   ! this . _showHidden )  { 
155159        this . _removeTabView ( sidetab ) ; 
156160      }  else  { 
157161        this . _appendTabView ( sidetab ) ; 
@@ -237,19 +241,19 @@ TabList.prototype = {
237241  } , 
238242  _closeTabsAfter ( tabIndex )  { 
239243    const  toClose  =  [ ...this . _tabs . values ( ) ] 
240-                     . filter ( tab  =>  tab . index  >  tabIndex  &&  ! tab . hidden ) 
244+                     . filter ( tab  =>  tab . index  >  tabIndex  &&  ! ( tab . hidden   &&   ! this . _showHidden ) ) 
241245                    . map ( tab  =>  tab . id ) ; 
242246    browser . tabs . remove ( toClose ) ; 
243247  } , 
244248  _closeAllTabsExcept ( tabId )  { 
245249    const  toClose  =  [ ...this . _tabs . values ( ) ] 
246-                     . filter ( tab  =>  tab . id  !==  tabId  &&  ! tab . pinned  &&  ! tab . hidden ) 
250+                     . filter ( tab  =>  tab . id  !==  tabId  &&  ! tab . pinned  &&  ! ( tab . hidden   &&   ! this . _showHidden ) ) 
247251                    . map ( tab  =>  tab . id ) ; 
248252    browser . tabs . remove ( toClose ) ; 
249253  } , 
250254  _reloadAllTabs ( )  { 
251255    for  ( let  tab  of  this . _tabs . values ( ) )  { 
252-       if  ( ! tab . hidden )  { 
256+       if  ( ! ( tab . hidden   &&   ! this . _showHidden ) )  { 
253257        browser . tabs . reload ( tab . id ) ; 
254258      } 
255259    } 
@@ -500,7 +504,7 @@ TabList.prototype = {
500504        activeTab  =  sidetab ; 
501505      } 
502506      let  fragment  =  tab . pinned  ? pinnedFragment  : unpinnedFragment ; 
503-        if  ( ! tab . hidden )  { 
507+ 		 if  ( ! ( tab . hidden   &&   ! this . _showHidden ) )  { 
504508        fragment . appendChild ( sidetab . view ) ; 
505509      } 
506510    } 
@@ -599,7 +603,7 @@ TabList.prototype = {
599603    const  sidetab  =  this . __create ( tabInfo ) ; 
600604    // Bail early and don't insert the tab in the DOM: we'll do it later 
601605    // if the tab becomes visible. 
602-     if  ( tabInfo . hidden )  { 
606+     if  ( tabInfo . hidden   &&   ! this . _showHidden )  { 
603607      return ; 
604608    } 
605609    this . _clearSearch ( ) ; 
@@ -634,7 +638,7 @@ TabList.prototype = {
634638      return ; 
635639    } 
636640    const  allTabs  =  [ ...this . _tabs . values ( ) ] 
637-                     . filter ( tab  =>  tab . pinned  ===  sidetab . pinned  &&  ! tab . hidden ) 
641+                     . filter ( tab  =>  tab . pinned  ===  sidetab . pinned  &&  ! ( tab . hidden   &&   ! this . _showHidden ) ) 
638642                    . sort ( ( a ,  b )  =>  a . index  -  b . index ) ; 
639643    const  tabAfter  =  allTabs . find ( tab  =>  tab . index  >  sidetab . index ) ; 
640644    if  ( ! tabAfter )  { 
0 commit comments