aboutsummaryrefslogtreecommitdiff
path: root/src/stores
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-08-27 17:40:50 -0700
committerFuwn <[email protected]>2023-08-27 17:40:50 -0700
commit585bc0cb4993323c855cf4112491b5c55bfcd611 (patch)
tree059ecc218841c8e84413871f7ef83b43bcf3fbf0 /src/stores
parentfix(manga): pruning (diff)
downloaddue.moe-585bc0cb4993323c855cf4112491b5c55bfcd611.tar.xz
due.moe-585bc0cb4993323c855cf4112491b5c55bfcd611.zip
feat(manga): chapter rounding
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/roundDownChapters.ts14
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;