Skip to content

Instantly share code, notes, and snippets.

@scriptype
Created December 31, 2016 22:47
Show Gist options
  • Save scriptype/99d195c8e608081fd67fb5e949e74474 to your computer and use it in GitHub Desktop.
Save scriptype/99d195c8e608081fd67fb5e949e74474 to your computer and use it in GitHub Desktop.
Toplist-as-a-counter
window.onbeforeunload = e => {
postList(url, {
nick: "onbeforeunload yes",
message: "success ok " + Date.now()
}).then(() => {
console.log('posted √')
}).catch(e => {
console.log('couldnt post', e)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment