Skip to content

Commit 638fab1

Browse files
committed
chore: added deck shiny filter back
1 parent 0a2225f commit 638fab1

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# UnderScript Changelog
22

3+
## Version 0.63.3 (2025-07-06)
4+
1. Added Shiny filter on Decks page back
5+
36
## Version 0.63.2 (2025-07-06)
47
1. Fixed a translation error with friendship rewards
58
1. Fixed end turn hotkey toast not showing correct setting

lang/en/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
"filter.disable": "Disable filter",
4949
"filter.shiny": "Merge Shiny Cards",
5050
"filter.shiny.option": [
51-
"Never (Vanilla)",
52-
"Deck",
51+
"Never",
52+
"Deck (Vanilla)",
5353
"Always"
5454
],
5555
"filter.split": "Split Based and Token",

src/base/library/filter.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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() {
138143
function createButton(type) {
139144
return $(`
140145
<label>
141-
<input type="checkbox" id="${type.toLowerCase()}RarityInput" class="rarityInput custom" rarity="${type}" onchange="applyFilters(); showPage(0);">
146+
<input type="checkbox" id="${type.toLowerCase()}RarityInput" class="rarityInput custom" rarity="${type}" onchange="applyFilters(); showPage(currentPage);">
142147
<img src="images/rarity/BASE_${type}.png">
143148
</label>`);
144149
}
145150

146151
function 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+
154167
function 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

Comments
 (0)