Hello,I developed a browser extension that captures Go diagrams and full boards to generate SGF or HEN strings. My current concern is whether users could abuse it to cheat during live games. How can I programmatically detect if the active OGS)page is displaying an ongoing live match, specifically using the DOM or URL rather than the OGS API?
4 Likes
I think that you want to block correspondence games in play as well a live ones, right?
If you’re on a /game route and there is an element with attribute data-game-id set in the DOM, then there is a board with a game on the page, in which case you can access window.global_goban?.engine?.phase to see if it is in play.
2 Likes
I should probably limit this to cases where analysis has been explicitly disabled by the players.
window.global_goban?.engine?.disable_analysis looks promising.
The extension is ready and respects the analysis availability of games in progress ![]()
3 Likes