-
Notifications
You must be signed in to change notification settings - Fork 78
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
Store neko position across pages #31
base: main
Are you sure you want to change the base?
Conversation
I like this! If you'd like some more stuff to do, make the localStorage entry only change on page beforeUnload. If not i'll merge it once I have the time to implement that I might also wanna see if i can make this configurable with like data-neko-localstorage-pos or something with a better name on the script element Thank you for your PR c: |
Thank you! And do you mean like as a bool or the key name or something else? I should be able to do that too c: |
i meant like, on the script tag you can have if "asdf" is true then persist data across navigation, else dont save or read localStorage you could call it "data-persist-position" or something |
Ohh cool okay |
It can be set based on |
This comment was marked as off-topic.
This comment was marked as off-topic.
what about window.navigation.addEventListener("navigate", (event) => {
console.log('location changed!');
}) |
That specifically didn't work but I just got data to store with both |
This comment was marked as off-topic.
This comment was marked as off-topic.
Turns out I did a stupid and tried to add the event to document at first and just never realised, but I think it only works for window |
please make issues for feature requests rather than making requests in an unrelated pull request |
okay :C |
Basically what it says, it's just a solution for #10 using local storage