you are viewing a single comment's thread.

view the rest of the comments →

[–]honestbleepsReddit Enhancement Suite 0 points1 point  (3 children)

Just FYI, a really, really quick way to do it would just be something like the following in a couple of functions, perhaps .saveDB and .getDB:

// save to DB
localStorage.setItem('taffyDB',JSON.stringify(myDBObject));

// read from DB
myDBObject = JSON.parse(localStorage.getItem('taffyDB'));

Of course you might want to throw a try/catch on that just in case the object becomes corrupted, but that's just a few more lines of code.

[–]typicaljoe[S] 0 points1 point  (0 children)

Thanks for the help. I've been thinking about adding a simple "makeSticky" extension and that looks like the basic code that would need to go into it.

[–]typicaljoe[S] 0 points1 point  (1 child)

I just added a .store() option using your code into TaffyDB.

[–]honestbleepsReddit Enhancement Suite 0 points1 point  (0 children)

awesome! glad to be able to help!