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

Commit

Permalink
Fix #7877: Fix NightMode applying to elements with a background-image (
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T committed Nov 29, 2023
1 parent bde11ad commit 884807c
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 884807c

Please sign in to comment.