summaryrefslogblamecommitdiff
path: root/js/getTheme.ts
blob: 769ea3cb6e428cb9edb8adb513e211283b46e7c8 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                                   
/// <reference path="setTheme.ts" />

function getTheme(): Theme {
	let theme = Theme.Dark;

	try {
		theme = JSON.parse(localStorage.getItem("theme")!);
	} catch (e: any) {
		console.log("invalid theme, using dark");
	}

	return theme;
}