Skip to content

Commit

Permalink
Merge pull request #30 from J4K0B/patch-1
Browse files Browse the repository at this point in the history
Fix Button Not appearing
  • Loading branch information
pavelgordon committed Jun 20, 2024
2 parents 39e381c + 6647344 commit 00d8b08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/scripts/contentscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let button, helpLink;

//waits for DOM to load the review button and then injects `Sync with Anki` button into web page.
function injectSyncButton() {
const reviewButtonNodeList = document.querySelectorAll("a[href*='review?'][color='secondary-default']")
const reviewButtonNodeList = document.querySelectorAll("button[href*='review?'][color='primary-emphasis']")
if (reviewButtonNodeList && reviewButtonNodeList.length === 1) {
const parent = reviewButtonNodeList[0].parentElement;
const sibling = reviewButtonNodeList[0];
Expand Down Expand Up @@ -134,4 +134,4 @@ function createSyncButtonDiv() {
div.append(helpLink)

return div;
}
}

0 comments on commit 00d8b08

Please sign in to comment.