Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ext/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"manifest_version": 3,
"description": "Opens PGN of a game from chess.com or chessgames.com in lichess.org analysis",
"homepage_url": "http://www.zerosharp.com",
"update_url": "https://clients2.google.com/service/update2/crx",
"icons": {
"128": "icons/knight128.png",
"16": "icons/knight16.png",
Expand Down
17 changes: 9 additions & 8 deletions ext/src/bg/getpgn.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,20 +192,21 @@ async function openShareDialog() {
await secondaryControlsButton.click()
}
var shareButton =
document.querySelector('[data-cy="sidebar-share-icon"]') || // Locale-independent selector (works in all languages)
document.querySelector('[data-cy="analysis-secondary-controls-menu-open-share"]') || // New button nested in secondary controls menu
document.querySelector('button[aria-label="Share"]') || // New specific aria-label selector
document.querySelector('button.cc-icon-button-component[aria-label="Share"]') || // More specific cc-icon-button
document.querySelector('button[aria-label="Share"]') || // English aria-label
document.querySelector('button[aria-label="공유"]') || // Korean aria-label
document.querySelector('button.cc-icon-button-component[aria-label="Share"]') ||
document.querySelector('span.secondary-controls-icon.download') ||
document.querySelector('button.share-button-component.icon-share') ||
document.querySelector('button.share-button-component.icon-share') ||
document.querySelector('button.icon-font-chess.share.live-game-buttons-button') ||
document.querySelector('button.share-button-component.share') ||
document.querySelector("button[data-test='download']") ||
document.querySelector("#shareMenuButton") ||
document.querySelector(".icon-font-chess.share.icon-font-primary") ||
document.querySelector(".icon-font-chess.share.game-buttons-icon") ||
document.querySelector(".icon-font-chess.share") ||
document.querySelector(".icon-share");
document.querySelector('#shareMenuButton') ||
document.querySelector('.icon-font-chess.share.icon-font-primary') ||
document.querySelector('.icon-font-chess.share.game-buttons-icon') ||
document.querySelector('.icon-font-chess.share') ||
document.querySelector('.icon-share');
if (shareButton) {
return new Promise((resolve) => {
shareButton.click()
Expand Down