import { writable } from "svelte/store"; let r = "main"; if (window.location.hash.length) { r = window.location.hash.replace("#", ""); } else { r = "main"; } const store = writable(r); store.subscribe(s => { if (s === "main") s = "" window.location.hash = s; }) export default store;