Skip to content

Instantly share code, notes, and snippets.

@MeoMix
Created September 13, 2012 04:40
Show Gist options
  • Save MeoMix/3711891 to your computer and use it in GitHub Desktop.
Save MeoMix/3711891 to your computer and use it in GitHub Desktop.
//JAVASCRIPT! The wonderful world where you can't do this:
chrome.storage.sync.set({playlist.id: JSON.stringify(playlist)});
//BUT! You can do this!
var keyValuePair = {};
keyValuePair[playlist.id] = JSON.stringify(playlist);
chrome.storgae.sync.set(keyValuePair);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment