Skip to content

Instantly share code, notes, and snippets.

@grssam
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grssam/8714857 to your computer and use it in GitHub Desktop.
Save grssam/8714857 to your computer and use it in GitHub Desktop.
/**
* Open Browser Toolbox after building your Nightly with the patch from bug 965872 applied.
* Go to Scratchpad Tab
* Run this script
*/
let { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
let { require } = devtools;
let {StorageFront} = require("devtools/server/actors/storage");
let s, a;
let target = devtools.TargetFactory.forTab(gBrowser.selectedTab);
target.makeRemote().then(() => {
s = StorageFront(target.client, target.form);
s.listStores().then(b => {
console.log(b);
a = b;
a.cookies.getStoreObjects(a.cookies.hosts[0].host).then(console.log)
a.localStorage.getStoreObjects(a.localStorage.hosts[0].host).then(console.log)
});
s.on("stores-update", j => console.log(j));
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment