Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Unique Local Variables in script.js #100

Open
fubduck opened this issue Jan 23, 2021 · 1 comment
Open

Use Unique Local Variables in script.js #100

fubduck opened this issue Jan 23, 2021 · 1 comment
Labels
web Stuff for the web team to look at

Comments

@fubduck
Copy link

fubduck commented Jan 23, 2021

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.

@mutability
Copy link

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 mutability added the web Stuff for the web team to look at label May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web Stuff for the web team to look at
Projects
None yet
Development

No branches or pull requests

2 participants