Inject Game Review button on chess.com#16
Inject Game Review button on chess.com#16makaroni4 wants to merge 3 commits intoZeroSharp:masterfrom
Conversation
| return true; | ||
| } | ||
|
|
There was a problem hiding this comment.
🔍 Sorry about these changes, it's VS Code cleaning up trailing spaces 🧹
| } | ||
| } | ||
|
|
||
| function injectButton(buttonsContainer) { |
There was a problem hiding this comment.
🔍 Does this logic deserver its own file?
| @@ -1,13 +1,3 @@ | |||
| function isChessComVersion2(url) { | |||
| "permissions": [ | ||
| "activeTab" | ||
| ], | ||
| "web_accessible_resources": [ |
There was a problem hiding this comment.
|
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 👋 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 🙌 |
Original issue: #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
sendMessagemechanism (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:
extfolder from a downloaded repo.