-
-
Save vielhuber/06eef5f7aa8353606ae33d63ebd42008 to your computer and use it in GitHub Desktop.
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(); }); | |
}); |
patched
ist noch nd fertig aber hier:
// ==UserScript==
// @name ANTON RAV SCRIPT
// @namespace http://tampermonkey.net/
// @Version 1.1.0
// @description A collection of modules put into one script.
// @author Salami Ninja (sjs7 on discord)
// @match https://www.tampermonkey.net/index.php?ext=dhdg&updated=true&version=5.1.1
// @ICON https://cdn.discordapp.com/attachments/935898565904052284/1274703607022751907/Neues_Projekt_2.png?ex=66c337be&is=66c1e63e&hm=b6f5cadfa77b15dcf5cb0972f4fb94a768d8d0669e1c0151703f528b1e39fff9&
// @grant none
// @match ://anton.app/
// @match ://anton.app/de/
// @exclude ://sjs7.xyz/scripttest/tapermonkey/arav
// ==/UserScript==
(function() {
// Styles
const styles = .zui { position: fixed; right: 10px; top: 10px; z-index: 999999; display: flex; flex-direction: column; font-family: monospace; font-size: 14px; color: #fff; width: 250px; user-select: none; border: 2px solid #000; cursor: move; } .zui-item { padding: 5px 8px; display: flex; justify-content: space-between; align-items: center; background: #222; cursor: pointer; } .zui-item:hover { background: #333; } .zui-item span { color: #fff; font-family: monospace; font-size: 14px; } .zui-header { background: #000; } .zui-header span { font-size: 16px; } .zui-header:hover { background: #000; } .zui-on { color: green; } .zui-item-value { font-size: 0.8em; } .zui-content .zui-item-value { font-weight: bolder; }
;
// Create and append styles
const styleEl = document.createElement('style');
styleEl.textContent = styles;
document.head.appendChild(styleEl);
// Create GUI
const gui = createGUI();
document.body.appendChild(gui);
function createGUI() {
const guiEl = document.createElement('div');
guiEl.className = 'zui';
guiEl.innerHTML = `
<div class="zui-item zui-header">
<span>[/] Anton RAV</span>
<span class="zui-item-value">[close]</span>
</div>
<div class="zui-content">
<div class="zui-item">
<input type="number" id="coinInput" placeholder="Enter coins" style="width: 100%;">
</div>
<div class="zui-item" id="addCoinsButton">
<span>Add Coins</span>
</div>
<div class="zui-item" id="completeLevel">
<span>Complete Level</span>
</div>
</div>
`;
const headerEl = guiEl.querySelector('.zui-header');
const contentEl = guiEl.querySelector('.zui-content');
const headerStatusEl = guiEl.querySelector('.zui-item-value');
const addCoinsButton = guiEl.querySelector('#addCoinsButton');
const coinInput = guiEl.querySelector('#coinInput');
const completeLevelButton = guiEl.querySelector('#completeLevel');
headerEl.onclick = function() {
const isHidden = contentEl.style.display === 'none';
contentEl.style.display = isHidden ? '' : 'none';
headerStatusEl.innerText = isHidden ? '[close]' : '[open]';
};
addCoinsButton.onclick = function() {
const coins = parseInt(coinInput.value);
if (!isNaN(coins)) {
addCoins(coins);
}
};
completeLevelButton.onclick = completeLevel;
// Make the GUI draggable
let isDragging = false;
let currentX;
let currentY;
let initialX;
let initialY;
let xOffset = 0;
let yOffset = 0;
guiEl.addEventListener("mousedown", dragStart);
document.addEventListener("mousemove", drag);
document.addEventListener("mouseup", dragEnd);
function dragStart(e) {
initialX = e.clientX - xOffset;
initialY = e.clientY - yOffset;
if (e.target === headerEl) {
isDragging = true;
}
}
function drag(e) {
if (isDragging) {
e.preventDefault();
currentX = e.clientX - initialX;
currentY = e.clientY - initialY;
xOffset = currentX;
yOffset = currentY;
setTranslate(currentX, currentY, guiEl);
}
}
function dragEnd(e) {
initialX = currentX;
initialY = currentY;
isDragging = false;
}
function setTranslate(xPos, yPos, el) {
el.style.transform = "translate3d(" + xPos + "px, " + yPos + "px, 0)";
}
return guiEl;
}
function addCoins(coins) {
const sourceId = localStorage.getItem('sourceId').split('"').join('');
const deviceLogId = localStorage.getItem('deviceLogId').split('"').join('');
const 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();
});
});
}
function completeLevel() {
const sourceId = localStorage.getItem('sourceId').split('"').join('');
const deviceLogId = localStorage.getItem('deviceLogId').split('"').join('');
const 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":"levelComplete",
"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 => {
alert('Level completed!');
window.location.reload();
});
});
}
// Keyboard shortcut to toggle GUI
window.addEventListener('keyup', function(event) {
if (document.activeElement && document.activeElement.tagName === 'INPUT') return;
if (event.code === 'Slash') {
gui.style.display = gui.style.display === 'none' ? '' : 'none';
}
});
})();
Respekt, dass du dir die Mühe gemacht das das zu Coden und es auch hier hochgeladen hast🥹
es funktioniert nicht aber ich arbeite immernoch daran.
mhhh
der hack wurde gepacht ich hab einen neuen der funktioniert
bin noch nicht ganz fertig
er funktioniert mit der websockez schnitstelle von anton
geil
cool
💪
What do you mean salrn by @grant none?
Ich werds nachher mal ausprobieren😁