feat: New features (research, invest, gambling, new game+, trophies)
This commit is contained in:
+2
-5
@@ -35,10 +35,7 @@ export function icon(key) {
|
||||
return h('span', { class: 'icon icon--placeholder', 'aria-hidden': 'true', dataset: { icon: key } });
|
||||
}
|
||||
|
||||
/** Re-resolve the icons that live in index.html (resource tiles). */
|
||||
/** Re-resolve the icons that live in index.html (the resource bar). */
|
||||
export function refreshStaticIcons(root = document) {
|
||||
for (const el of root.querySelectorAll('[data-icon]')) {
|
||||
if (el.closest('#generators, #upgrades')) continue; // those lists are rebuilt by view.js
|
||||
el.replaceWith(icon(el.dataset.icon));
|
||||
}
|
||||
for (const el of root.querySelectorAll('.resourcebar [data-icon]')) el.replaceWith(icon(el.dataset.icon));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user