hi. i stumbled accross you site and noticed that the swag toggle button is not memorized between page reloads so i made an edited version of its javascript that stores the state in the localStorage (basically cookies but more permanent and only for clientside javascript). here is the pastbin link: https://pastebin.com/quV2v3gn if you want to know more about local storage read its MDN article: https://mzl.la/3LTNc9l
Hey thank you so much for this! I saw this months ago and finally got some time this morning to implement this it into my site. Your code was almost perfect, just needed to wrap the initial load of storedSwagEnable in a JSON.parse() as LocalStorage is always stored as a string. Thank you for taking time to help me out with this!
To stop the caching problem, you could try adding this (not sure if it works): [meta http-equiv="cache-control" content="no-cache"] you will of course have to replace the ] by > and the [ by < . Its just to prevent neocities from filtering it out
Hey thank you so much for this! I saw this months ago and finally got some time this morning to implement this it into my site. Your code was almost perfect, just needed to wrap the initial load of storedSwagEnable in a JSON.parse() as LocalStorage is always stored as a string. Thank you for taking time to help me out with this!