

Jquery.localStorageTextareas - michokest
https://github.com/micho/jquery.localStorageTextareas

======
dazbradbury
Reminds me of: <http://simsalabim.github.com/sisyphus/>

However, this appears to have more limitations than sisyphus, where you can
simply call the library and have all form data saved to local storage:

    
    
      $('form').sisyphus();

~~~
michokest
What a great find! My solution is much more limited but also very lightweight:
only textareas, only two scenarios (click or load on demand)

~~~
dazbradbury
No problem, it's often hard to find the thing you want, so you just build it.
Thanks for sharing and helping others!

However, I would say, that for 4kb (minified), sisyphus offers a lot of
functionality - and is supposedly cross-browser compatible. If you want to
limit it to textareas only, it's not much of a modification.

Anyway, just thought I'd point out an alternative, and thanks again for
sharing your work!

------
ImJasonH
This should be a Chrome extension for Firefox plug-in, that automatically adds
this feature to any textbox on the web.

~~~
jcassee
You mean like Lazarus?

Chrome:
[https://chrome.google.com/webstore/detail/loljledaigphbcpfhf...](https://chrome.google.com/webstore/detail/loljledaigphbcpfhfmgopdkppkifgno)

Firefox: [https://addons.mozilla.org/en-US/firefox/addon/lazarus-
form-...](https://addons.mozilla.org/en-US/firefox/addon/lazarus-form-
recovery/)

------
egze
What are some real world scenarios when you would need it?

~~~
kennu
It sounds like an interesting idea for auto-saving article text or similar
longer submissions, which are sometimes lost if you accidentally quit the
browser or something else goes wrong.

------
emehrkay
Any reason why it is limited to textareas?

~~~
michokest
I didn't need it for anything else. Feel free to send a pull request if you
find it useful for more things.

~~~
emehrkay
I probably wont do that, but maybe updating the selector would allow for more
form elements to be used (if somebody wanted to use it for more than just
textareas)

    
    
        textarea[data-save-id]
    
        to 
    
        form *[data-save-id]
    

I dont even know if that is a valid sizzle selector though

------
huggyface
_Depends on Modernizr.js, underscore.js, jQuery 1.7_

Is the JavaScript library thing getting a little out of hand?

The functionality that this offers is but a few lines of unencumbered code
with zero dependencies (obviously gracefully not doing anything if the browser
supports it).

~~~
michokest
I made this for my own project (which uses all those), but you have a point.

I just removed the Modernizr dependency. I kept jQuery 1.7. I kept
underscore.js for the great _.debounce function.

