Skip to content

Instantly share code, notes, and snippets.

@piatra
Last active February 12, 2019 16:31
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 piatra/a4de28d242721d4199f89a6d78e9f66e to your computer and use it in GitHub Desktop.
Save piatra/a4de28d242721d4199f89a6d78e9f66e to your computer and use it in GitHub Desktop.
caching_qa_test_steps
XPCOMUtils.defineLazyGetter(this, "gTextDecoder", () => new TextDecoder());
const filepath = OS.Path.join(OS.Constants.Path.localProfileDir, "activity-stream.discovery_stream.json");
OS.File.read(filepath).then(binaryData => {
const json = gTextDecoder.decode(binaryData);
data = JSON.parse(json);
for (let i in data) {
if (i === "feeds") {
for (j in data[i]) { console.log(i, data[i][j].lastUpdated); }
} else {
console.log(i, data[i].lastUpdated || data[i]._timestamp);
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment