diff options
| author | Fuwn <[email protected]> | 2023-08-27 17:40:50 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-08-27 17:40:50 -0700 |
| commit | 585bc0cb4993323c855cf4112491b5c55bfcd611 (patch) | |
| tree | 059ecc218841c8e84413871f7ef83b43bcf3fbf0 /src/stores | |
| parent | fix(manga): pruning (diff) | |
| download | due.moe-585bc0cb4993323c855cf4112491b5c55bfcd611.tar.xz due.moe-585bc0cb4993323c855cf4112491b5c55bfcd611.zip | |
feat(manga): chapter rounding
Diffstat (limited to 'src/stores')
| -rw-r--r-- | src/stores/roundDownChapters.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/stores/roundDownChapters.ts b/src/stores/roundDownChapters.ts new file mode 100644 index 00000000..f4ac3513 --- /dev/null +++ b/src/stores/roundDownChapters.ts @@ -0,0 +1,14 @@ +import { browser } from '$app/environment'; +import { writable } from 'svelte/store'; + +const roundDownChapters = writable<string>( + browser ? localStorage.getItem('roundDownChapters') ?? 'false' : 'false' +); + +roundDownChapters.subscribe((value) => { + if (browser) { + localStorage.setItem('roundDownChapters', value); + } +}); + +export default roundDownChapters; |