Skip to content

Commit

Permalink
Explorer: THIS is the real icon fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
e3ndr committed Mar 19, 2024
1 parent 504c9d9 commit 1985853
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions explorer/src/lib/iconHook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,7 @@ function replaceIcon(element: Element) {
export default async function hook() {
new MutationObserver(async (records) => {
await tick();
for (const record of records) {
if (record.addedNodes.length > 0) {
for (const element of record.addedNodes) {
if (element.nodeName.toLowerCase() == 'icon') {
replaceIcon(element as Element);
break;
}
}
}
}
document.querySelectorAll('icon').forEach(replaceIcon);
}).observe(document.body, {
subtree: true,
attributes: true,
Expand Down

0 comments on commit 1985853

Please sign in to comment.