@@ -109,7 +109,12 @@ function applyLook(refresh = decks || crafting) {
109109    } ) ; 
110110  } 
111111
112+   // Re-add shiny filter 
113+   if  ( ! $ ( '#shinyInput' ) . length )  { 
114+     $ ( '#utyInput' ) . parent ( ) . after ( ' ' ,  shinyButton ( ) ) ; 
115+   } 
112116  $ ( '#shinyInput' ) . prop ( 'disabled' ,  mergeShiny ( ) ) ; 
117+ 
113118  if  ( refresh )  { 
114119    global ( 'applyFilters' ) ( ) ; 
115120    global ( 'showPage' ) ( 0 ) ; 
@@ -138,19 +143,27 @@ function mergeShiny() {
138143function  createButton ( type )  { 
139144  return  $ ( ` 
140145  <label> 
141-     <input type="checkbox" id="${ type . toLowerCase ( ) } ${ type } 0 );"> 
146+     <input type="checkbox" id="${ type . toLowerCase ( ) } ${ type } currentPage );"> 
142147    <img src="images/rarity/BASE_${ type }  
143148  </label>` ) ; 
144149} 
145150
146151function  allTribeButton ( )  { 
147152  return  $ ( ` 
148153  <label> 
149-     <input type="checkbox" id="allTribeInput" onchange="applyFilters(); showPage(0 );"> 
154+     <input type="checkbox" id="allTribeInput" onchange="applyFilters(); showPage(currentPage );"> 
150155    <img src="images/tribes/ALL.png"> 
151156  </label>` ) ; 
152157} 
153158
159+ function  shinyButton ( )  { 
160+   return  $ ( ` 
161+   <label> 
162+     <input type="checkbox" id="shinyInput" onchange="applyFilters(); showPage(currentPage);"> 
163+     <span class="rainbowText">S</span> 
164+   </label>` ) ; 
165+ } 
166+ 
154167function  ownSelect ( )  { 
155168  return  $ ( ` 
156169  <select id="collectionType" onchange="applyFilters(); showPage(0);"> 
@@ -170,7 +183,11 @@ filters.push(
170183    return  this . super ( card ) ; 
171184  } , 
172185  function  shinyFilter ( card ,  removed )  { 
173-     if  ( removed  &&  mergeShiny ( ) )  { 
186+     if  ( ! removed )  { 
187+       return  ! mergeShiny ( )  &&  card . shiny  !==  $ ( '#shinyInput' ) . prop ( 'checked' ) ; 
188+     } 
189+ 
190+     if  ( mergeShiny ( ) )  { 
174191      return  this . super ( { 
175192        ...card , 
176193        shiny : ! card . shiny , 
0 commit comments