3 ms·
//Level 47: Din Don Dan //F12 > Console > Paste Code const hitNotesSet = new WeakSet(); const tolerance = 10; // hassasiyet const arrowMap = { '←': document
by selamcan 1y ago
//Level 47: Din Don Dan
//F12 > Console > Paste Code
const hitNotesSet = new WeakSet();
const tolerance = 10; // hassasiyet
const arrowMap = {
'←': document.querySelector('.arrows-container .arrow-key:nth-child(1)'),
'↓': document.querySelector('.arrows-container .arrow-key:nth-child(2)'),
'↑': document.querySelector('.arrows-container .arrow-key:nth-child(3)'),
'→': document.querySelector('.arrows-container .arrow-key:nth-child(4)')
};
const keyMap = {
'↑': 'ArrowUp',
'↓': 'ArrowDown',
'←': 'ArrowLeft',
'→': 'ArrowRight'
};
function hitNotes() {
document.querySelectorAll('.note').forEach(note => {
if (hitNotesSet.has(note)) return;
const arrow = note.innerText.trim();
const target = arrowMap[arrow];
if (!target) return;
const noteRect = note.getBoundingClientRect();
const targetRect = target.getBoundingClientRect();
const noteY = noteRect.top + noteRect.height / 2;
const targetY = targetRect.top + targetRect.height / 2;
if (Math.abs(noteY - targetY) <= tolerance) {
const key = keyMap[arrow];
if (key) {
console.log(`Basıldı: ${arrow} (${key})`);
document.dispatchEvent(new KeyboardEvent('keydown', { key }));
document.dispatchEvent(new KeyboardEvent('keyup', { key }));
hitNotesSet.add(note);
}
}
});
}
setInterval(hitNotes, 10);
- axiolite 1y agoI have a better solution: F12 -> Storage -> Local Storage -> https://neal.fun https://neal.fun Select "not-a-robot-level" and change this value from "46" to "47" Refresh your browser tab.