KnightSense observes the visible Chess.com board through content.js and helpers.js. A Chess.com markup change may affect board discovery, piece mapping, orientation, active color, or overlay placement.
| Area | Source location | What to inspect |
|---|---|---|
| Board discovery | findChessComBoardElement() |
Board host selectors and custom elements |
| Shadow DOM traversal | findPiecesAndContext() |
shadowRoot paths and nested board hosts |
| Piece discovery | getPiecesFromContext() |
.piece, square-*, and data attributes |
| Piece mapping | Helpers.mapPieceToChar() |
White/black piece class names |
| Active color | Helpers.determineActiveColor() |
Clock turn classes and highlighted squares |
| FEN generation | getChessComFen() |
Square numbering, orientation, and side to move |
| Overlay host | createOverlay() and draw helpers |
Board size, stacking context, and SVG coordinates |
- Open a Chess.com analysis board with Developer Tools.
- Identify the board host, piece nodes, square coordinates, orientation marker, and turn indicator.
- Change only the smallest selector or mapping needed.
- Run the JavaScript syntax checks in the root README.
- Reload the extension from
chrome://extensions. - Refresh the Chess.com tab and test a static position first.
- Verify White, Black, flipped-board, captured-piece, and game-navigation states.
- Confirm arrows remain inside the board and that disabling the engine clears overlays.
Do not add credential collection, remote telemetry, automatic move execution, stealth behavior, or fair-play bypass logic while maintaining selectors. The intended behavior is visible, user-controlled analysis for learning and permitted review.