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 Dec 14, 2023
1 parent 2a57483 commit 3c6e5ad
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 3c6e5ad

Please sign in to comment.