diff --git a/tools/config.ts b/tools/config.ts new file mode 100644 index 000000000..3e8244e51 --- /dev/null +++ b/tools/config.ts @@ -0,0 +1,16 @@ +export function loadConfig(path: string): Config | null { + const item = localStorage.getItem(path); + if (!item) { + return null; + } + + try { + return JSON.parse(item) as Config; + } catch (e) { + return null; + } +} + +export interface Config { + searchBar: boolean, +} \ No newline at end of file