Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't grab the whole bookmark db, you're gonna have a bad time
  • Loading branch information
tekkub committed Dec 31, 2012
1 parent 3b57483 commit bc5f61a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 29 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Expand Up @@ -11,5 +11,5 @@
"storage",
"https://api.parse.com/*"
],
"version": "0.18"
"version": "0.19"
}
14 changes: 5 additions & 9 deletions script.coffee
Expand Up @@ -5,7 +5,6 @@ unless localStorage['db-version'] == '2'
localStorage['db-version'] = '2'

syncdata = null
loadingParse = false
colors = [
'silver'
'black'
Expand Down Expand Up @@ -61,14 +60,11 @@ getBookmarkData = (bookmark) ->
return data

else
unless loadingParse
loadingParse = true
$.parse.get 'bookmarks', (data) ->
for entry in data.results
console.log "Parse data received #{entry.objectId}", entry
localStorage[entry.objectId] = JSON.stringify entry
injectBookmark(bookmark)
loadingParse = false
$.parse.get 'bookmarks', where: {objectId: hash}, (data) ->
for entry in data.results
console.log "Parse data received #{entry.objectId}", entry
localStorage[entry.objectId] = JSON.stringify entry
injectBookmark(bookmark)

return default_data

Expand Down
36 changes: 17 additions & 19 deletions script.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bc5f61a

Please sign in to comment.