refactor: remove dynamic require (partial of #2)

Co-authored-by: Su-Yong <simssy2205@gmail.com>
This commit is contained in:
JellyBrick
2023-10-03 23:42:12 +09:00
parent 6eadc7f7e5
commit 6e315b9af2
24 changed files with 841 additions and 745 deletions

View File

@ -1,5 +1,7 @@
import { ipcRenderer } from 'electron';
import { ConfigType } from '../../config/dynamic';
import type { FastAverageColorResult } from 'fast-average-color';
function hexToHSL(H: string) {
@ -71,7 +73,7 @@ function changeElementColor(element: HTMLElement | null, hue: number, saturation
}
}
export default () => {
export default (_: ConfigType<'album-color-theme'>) => {
const observer = new MutationObserver((mutationsList) => {
for (const mutation of mutationsList) {
if (mutation.type === 'attributes') {