From d178caee5c93ad9ed91dbd082b0f0b5a9b0507aa Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Mon, 27 Mar 2023 21:38:43 +0530 Subject: Refactoring code. Only using hashes for output file names. Using singleton pattern to store the callbacks for observeDOM, and only one MutationObserver. --- src/shared/styling.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src/shared/styling.ts') diff --git a/src/shared/styling.ts b/src/shared/styling.ts index 0e527d9..3ec25c8 100644 --- a/src/shared/styling.ts +++ b/src/shared/styling.ts @@ -1,5 +1,6 @@ export const styles = (selector: string, styles: { [key: string]: string }) => { const elements = Array.from(document.querySelectorAll(selector)) as HTMLElement[]; + for (const element of elements) { for (const styleType in styles) { element.style[styleType as any] = styles[styleType]; -- cgit v1.2.3