Inject Game Review button on chess.com
Original issue: https://github.com/ZeroSharp/Chess.com_Analysis_Chrome_extension/issues/14
It's a sample PR that adds a Lichess Game Review button on chess.com.
Since chess.com is a Vue app, we need to listen to DOM Mutations to inject the review button properly. PR adds a Lichess icon and correspondent manifest changes.
The review button triggers PGN copy via the sendMessage mechanism (same as the extension icon), that's why the handling logic is extracted into a function.
Here's how it looks like for small screens:
And big screens:
Happy to get any feedback, in the meantime anyone can use this version manually:
- Download the forked repo https://github.com/makaroni4/Chess.com_Analysis_Chrome_extension
- Go to chrome://extensions/
- Click "Load unpacked" and select the
extfolder from a downloaded repo. - 🍻
This is amazing @makaroni4. Thanks so much! Sorry it's taken a while to look at your changes. I was in Iceland on holiday but I'll try to find some time this week to review and merge.
Hey @shamp00 :wave:
The PR is just a PoC that injects the button on one game review page (only with people, not with bots, for example).
Wdyt about adding the fixed position button (in the bottom of the screen, for example) vs injecting a button in the sidebar menu? Let's align on this and I'll add this to all pages. Thank you for this extension, I use it every time I play chess now 🙌