kirkmcdonald.github.io icon indicating copy to clipboard operation
kirkmcdonald.github.io copied to clipboard

Suggestion: Use HTML5 localStorage to save default settings

Open DarkMatterMatt opened this issue 7 years ago • 4 comments

It would be helpful to load default settings when navigating to the main page (with no hash).

You could easily use HTML5 localStorage for this (with JSON.stringify and JSON.parse).

DarkMatterMatt avatar Oct 28 '17 02:10 DarkMatterMatt

I think there are three parts to this:

  1. Add a button to the settings tab which will save the current settings to local storage.
  2. Add a button to the settings tab which will load the saved settings.
  3. Load those settings if the URL fragment is empty.

KirkMcDonald avatar Oct 29 '17 01:10 KirkMcDonald

I've forked your code and made it work on a locally hosted site - the only annoying thing is GitHub thinks I've changed everything because of the way Atom Beautifier works. Do you have a code formatter that you use (that I can use to compare changes in my code)?

DarkMatterMatt avatar Nov 09 '17 02:11 DarkMatterMatt

I do not use a code formatter. I do it all by hand, for better or worse.

KirkMcDonald avatar Nov 10 '17 05:11 KirkMcDonald

Related PR: https://github.com/KirkMcDonald/kirkmcdonald.github.io/pull/65

filipre avatar Feb 01 '19 08:02 filipre