-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpatch.message.js
More file actions
26 lines (25 loc) · 798 Bytes
/
patch.message.js
File metadata and controls
26 lines (25 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
settings.register({
name: 'Disable version toast',
key: 'underscript.season.disable',
refresh: () => onPage(''),
category: 'Home',
});
onPage('', function patches() {
if (settings.value('underscript.season.disable')) return;
eventManager.on(':loaded', () => {
document.querySelectorAll('.infoIndex').forEach((el) => {
const patch = el.querySelector('[data-i18n-custom="home-patch-message"]');
if (!patch) return;
const text = $el.html.get(el);
const version = patch.dataset.i18nArgs;
el.remove();
const key = `underscript.season.dismissed.${version}`;
fn.cleanData('underscript.season.', key);
if (settings.value(key)) return;
fn.dismissable({
key, text,
title: `Undercards Update`,
});
});
});
});