lichess.org
Donate

Found origin of KB not working

pastebin.com/UXZ7cnAQ - debugger:///VM278 gives the error that there is a syntax error about a "&&", and after tinkering around with the code, I managed to fix it to produce the code in the pastebin, which doesn't give an error when I paste it into console. This might fix the keyboard extension not working, but I don't know how to replace VM278 with the working code as soon as the webpage loads.

note: the 3 numbers after VM are different every time you reload the page
note 2: i have virtually no experience in web developing, and i have no idea how lichess's code works, so this is just me improvising, and if what i'm saying makes no sense, just ignore me
note 3: the original code in the VMxxx was in 1 line, and I used a javascript beautifier to make it into multiple lines
note 4: the other error about LichessRound not being defined is probably due to the first VM not running correctly, and therefore not defining the function
#1 Lichess doesn't support this extension, so this has everything to do with the extension not working.
Since lichess approved people to use this extension, why not make it a feature on the site? It will be much easier to use and people will have to complain less when the server updates or stuff, cause then bugs happen and lots of people will start talking in the forum, which will give more work to the mods.
#3 Lichess doesn't support this extension, which is one reason why it isn't part of the site.
qb is still working fine for me
I guess the problem is in those hacks with script.parentElement.removeChild(script). Also those tricks with innerText he does should be removed. I understand that Lichess has changed the layout and/or renamed some CSS classes, that's why it broke. I'm trying to make a new proper extension now which would also support another modes like Puzzle Storm and others.
@kevlu8 what you seeing are consequences of the extension removing random elements from the page due to bug.

This topic has been archived and can no longer be replied to.