dump1090 icon indicating copy to clipboard operation
dump1090 copied to clipboard

Use Unique Local Variables in script.js

Open fubduck opened this issue 5 years ago • 1 comments

Would it be possible for some or all of the Local Variables used in the script.js file for skyview978 and dump1090-fa be unique to their own webpages?

The script.js files are located in the following folders: \usr\share\dump1090-fa\html\script.js \usr\share\skyaware978\html\script.js

The ones I have modified for my location are the following: MapType SiteCirclesBaseDistance SiteCirclesCount SiteCirclesInterval ZoomLvl CenterLat CenterLon

I appended either an _978 or _1090 to the above variables depending on the webpage. This lets me view each page without having to reset it each time I refresh it.

fubduck avatar Jan 23 '21 13:01 fubduck

The underlying problem here is that localStorage is per-origin, not specific to the page.

A more general fix would be to prefix the keys with the URL (or URL path). (A shim of some sort to do this automatically probably makes more sense than changing every key used)

mutability avatar Jan 25 '21 14:01 mutability