Created
January 18, 2018 10:31
-
-
Save davemackintosh/f126f24db02243fa4a19c3f889a19fe7 to your computer and use it in GitHub Desktop.
Run in a console on the track package page of an Amazon order and you'll get a new localStorage entry each time it's run to track progress through the day.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function getProgress() { | |
if (!localStorage.amazonProgress) | |
localStorage.amazonProgress = "[]" | |
const store = JSON.parse(localStorage.amazonProgress) | |
store.push({ | |
time: Date.now(), | |
progress: JSON.parse(document.querySelector("script[type=\"a-state\"]").innerText).progressTracker.lastTransitionPercentComplete | |
}) | |
localStorage.amazonProgress = JSON.stringify(store) | |
return store | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If we can work out a pattern, we could return a status of sorts:
Something like that anyway.