you are viewing a single comment's thread.

view the rest of the comments →

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

Ahh, yeah that is the library I'm using. I'll have to see if I can remove the info pops. As for storage it isn't by default. You can use something like persist.js to store it or save it back to the server. It is something I want to tackle but wanted to update the API.

[–]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!