Skip to content

Instantly share code, notes, and snippets.

@1paul11
Forked from vielhuber/script.js
Created January 17, 2023 14:21
Show Gist options
  • Save 1paul11/c9770316316e5fe1a833880562f32bb9 to your computer and use it in GitHub Desktop.
Save 1paul11/c9770316316e5fe1a833880562f32bb9 to your computer and use it in GitHub Desktop.
anton app coin hack #js
coins = 42,
sourceId = localStorage.getItem('sourceId').split('"').join(''),
deviceLogId = localStorage.getItem('deviceLogId').split('"').join(''),
users = JSON.parse(localStorage.getItem('users'));
users.forEach(users__value => {
fetch('https://logger-lb-5.anton.app/events', {
method: 'POST',
'headers': { 'Content-Type': 'application/json' },
body: JSON.stringify({
"events":[{"event":"adjustCoins","value":coins,"src":sourceId,"created":(new Date()).toISOString()}],
"log":users__value.l,
"credentials":{"authToken":users__value.t,"deviceLogId":deviceLogId}
}),
}).then(v=>v).catch(v=>v).then(data => { window.location.reload(); });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment