DEV Community

loading...

Discussion on: Using Google's Tesseract OCR to cheat at online memory tests

Collapse
gkucmierz profile image
Grzegorz Kućmierz • Edited

There is much easier way to cheat this test.

Just few lines of JavaScript code:

(() => {
  const DELAY = 200;
  const set = new Set();
  setInterval(() => {
    const word = document.querySelector('.word').innerText;
    const label = set.has(word) ? 'SEEN' : 'NEW';
    const btn = [...document.querySelectorAll('button')].filter(btn => btn.innerText === label).pop();
    btn.click();
    set.add(word);
  }, DELAY);
})();

cheating memory test

Collapse
iamcathal profile image
IamCathal Author

That is a very concise solution, nice.