aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/palette.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-05-06 22:01:12 +0800
committercrupest <crupest@outlook.com>2021-05-06 22:01:12 +0800
commitdee1f495aec7cf29769080d5e4208abe32063d6f (patch)
tree560aa7c9bf673a78efb78cf1e709eab29d4fedf0 /FrontEnd/src/app/palette.ts
parentaad014ed2961ce660e8a4d6474a6197bee41f69c (diff)
downloadtimeline-dee1f495aec7cf29769080d5e4208abe32063d6f.tar.gz
timeline-dee1f495aec7cf29769080d5e4208abe32063d6f.tar.bz2
timeline-dee1f495aec7cf29769080d5e4208abe32063d6f.zip
feat: Timeline color.
Diffstat (limited to 'FrontEnd/src/app/palette.ts')
-rw-r--r--FrontEnd/src/app/palette.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/FrontEnd/src/app/palette.ts b/FrontEnd/src/app/palette.ts
index 98e7d814..c4f4f4f9 100644
--- a/FrontEnd/src/app/palette.ts
+++ b/FrontEnd/src/app/palette.ts
@@ -95,9 +95,11 @@ const paletteSubject: BehaviorSubject<Palette> = new BehaviorSubject<Palette>(
export const palette$: Observable<Palette> = paletteSubject.asObservable();
palette$.subscribe((palette) => {
- let styleTag = document.getElementById("timeline-palette-css");
+ const styleTagId = "timeline-palette-css";
+ let styleTag = document.getElementById(styleTagId);
if (styleTag == null) {
styleTag = document.createElement("style");
+ styleTag.id = styleTagId;
document.head.append(styleTag);
}
styleTag.innerHTML = generatePaletteCSS(palette);