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/scripts/optimize.ts | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src/scripts/optimize.ts') diff --git a/src/scripts/optimize.ts b/src/scripts/optimize.ts index c8125ee..55492b6 100644 --- a/src/scripts/optimize.ts +++ b/src/scripts/optimize.ts @@ -1,7 +1,23 @@ import { modifyDOM } from "@/shared/modify-dom"; modifyDOM([ - ["head > script:nth-child(34)", { src: null }], - ["head > script:nth-child(36)", { src: null, innerHTML: "$.prototype.nivoSlider = () => {};" }], - ["head > script:nth-child(43)", { src: null }] + [ + "head > script:nth-child(34)", + { + src: null + } + ], + [ + "head > script:nth-child(36)", + { + src: null, + innerHTML: "$.prototype.nivoSlider = () => {};" + } + ], + [ + "head > script:nth-child(43)", + { + src: null + } + ] ]); -- cgit v1.2.3