1 import { writable } from 'svelte/store';
3 export const map_store = writable();
4 export const results_store = writable();
5 export const last_api_request_url_store = writable();
6 export const page = writable({ count: 0 });
8 export function refresh_page() {
9 let pagename = window.location.pathname.replace('.html', '').replace(/^.*\//, '');
11 if (['search', 'reverse', 'details', 'deletable', 'polygons'].indexOf(pagename) === -1) {
15 // Add a counter here to make sure the store change is triggered
16 // everytime we refresh, not just when the page changes.
17 page.update(function (v) { return { tab: pagename, count: v.count + 1 }; });