Skip to content

Commit

Permalink
fix: update selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
7nik committed Mar 13, 2024
1 parent 51cc840 commit b5bc364
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ap-vk-poster",
"version": "2.6.6",
"version": "2.6.7",
"private": true,
"scripts": {
"build": "rollup -c --environment PROD",
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ function startApp (ev: Event) {
// add the button dynamically
new MutationObserver((records) => records.forEach((record) => {
record.addedNodes.forEach((elem) => {
if (elem instanceof HTMLSpanElement && elem.id === "rating") {
if (elem instanceof HTMLSpanElement && elem.classList.contains("rating")) {
elem.append(btn);
}
})
})).observe(document.getElementById("content")!, {
})).observe(document.querySelector(".content")!, {
childList: true,
subtree: true,
});
Expand Down

0 comments on commit b5bc364

Please sign in to comment.