Skip to content

Commit 3ee36eb

Browse files
authored
Merge pull request #62 from khiga8/kh-fix-errors-and-animated-player-duplicaates
fix: additional errors and animated player duplicates
2 parents 59284d8 + 130a214 commit 3ee36eb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export async function initialize() {
44
/* Listen for messages from the background script */
55
chrome.runtime.onMessage.addListener((message, sendResponse) => {
66
if (message.type === "navigation") {
7-
sendResponse({ status: "ok" });
87
appendAccessibilityInfo();
98
}
109
});

src/utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export function appendAccessibilityInfo() {
2828
".github-a11y-heading-prefix, .github-a11y-img-caption"
2929
).length > 0) return
3030

31-
commentBody.querySelectorAll("img").forEach(function (image) {
31+
[...commentBody.querySelectorAll("img")]
32+
.filter(el => !el.closest('animated-image'))
33+
.forEach(function (image) {
3234
const parentNodeName = image.parentElement.nodeName;
3335
if (parentNodeName === "A" || parentNodeName === "P") {
3436
const parent = image.closest("a") || image.closest("p");

0 commit comments

Comments
 (0)