Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix image inversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T committed Nov 29, 2023
1 parent cff7a19 commit 8951c07
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ function getStyleElement() {
}

function applyInvertFilterToChildBackgroundImageElements(parentNode) {
parentNode.querySelectorAll("[style*=\"background\"]").forEach(function(el) {
if ((el.style.backgroundImage || "").startsWith("url")) {
[...parentNode.children].forEach(function(el) {
if ((getComputedStyle(el)["background-image"] || "").startsWith("url")) {
applyInvertFilterToElement(el);
}
});
Expand Down

0 comments on commit 8951c07

Please sign in to comment.