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