Skip to content

Instantly share code, notes, and snippets.

@ShapeLayer
Created November 16, 2021 07:19
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 ShapeLayer/b1ea3466e2731307c9cd33baf6c53b1c to your computer and use it in GitHub Desktop.
Save ShapeLayer/b1ea3466e2731307c9cd33baf6c53b1c to your computer and use it in GitHub Desktop.
function sleep(ms) {
const wakeUpTime = Date.now() + ms;
while (Date.now() < wakeUpTime) {}
}
for (var i=0; i<##_NUMBER_##; i++) {
var a = document.createElement('a')
localSynap.movePage(i+1)
a.href=document.getElementById('page'+i).src
a.download = i+'.png'
document.body.appendChild(a)
a.click()
sleep(1000)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment