Hacker News new | ask | show | jobs
by mikeknoop 5229 days ago
Very well done, it seems I was beat to the punch (updating the article now...).

I'm curious, did you do anything special to work around fresh API hits each time the popup is loaded (ie. LocalStorage)?

1 comments

All data (account names and hash tags to remove) are stored client side in localstorage, so the extension doesn't query / load data from an external API like yours does. As a result, I haven't bumped into that "gotcha" yet. I do use a background page to bridge the popup's stored data with the content script that does all the heavy lifting (from what I remember). Just fyi on the localstorage adapter: leveraging the one from the Todo example on the backbone website. Thanks for giving me a shout out in your article, very kind of you.
I have another comment on this thread with an idea for future work (http://news.ycombinator.com/item?id=3631097). I'd be curious to know if leveraging background pages for containing the Backbone instance would be a clean way to handle persistence (of the entire app, not just data).

Have you ever looked at something like this?