Skip to content

Commit aee10f3

Browse files
committed
fix: Update message not turning into a toast
1 parent 76e8960 commit aee10f3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Version 0.27.2
44
1. New color for <span class="friend">friends</span> in chat
5+
1. Fix game patches not turning into toasts
56

67
## Version 0.27.1
78
1. Fixed card skin shop names looking small

src/base/vanilla/patch.message.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@ onPage('', function patches() {
99
if (settings.value('underscript.season.disable')) return;
1010
eventManager.on(':loaded', () => {
1111
document.querySelectorAll('.infoIndex').forEach((el) => {
12+
const patch = el.querySelector('[data-i18n-custom="home-patch-message"]');
13+
if (!patch) return;
1214
const text = $el.html.get(el);
13-
const index = text.indexOf(' - ');
14-
const version = text.substring(0, index);
15-
if (!version) return;
15+
const version = patch.dataset.i18nArgs;
1616
el.remove();
1717
const key = `underscript.season.dismissed.${version}`;
1818
fn.cleanData('underscript.season.', key);
1919
if (settings.value(key)) return;
2020
fn.dismissable({
21-
key,
22-
title: version,
23-
text: text.substring(index + 3),
21+
key, text,
22+
title: `Undercards Update`,
2423
});
2524
});
2625
});

0 commit comments

Comments
 (0)