Created
July 18, 2025 08:18
-
-
Save fabiensebban/f55d13cfe881229e4b9745cbddeb0555 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function applyCSS() { | |
const wishlistButtons = document.querySelectorAll('ooo-wl-product-card-button'); | |
const cssStyles = ` | |
svg { | |
fill: var(--ooo-wl-product-card-button-icon-color, #000); | |
} | |
`; | |
if (wishlistButtons) { | |
// Create style element | |
wishlistButtons.forEach((wishlistButton) => { | |
// Append to shadow root | |
const style = document.createElement('style'); | |
style.textContent = cssStyles; | |
wishlistButton.shadowRoot.appendChild(style); | |
}) | |
} | |
} | |
if (document.readyState === 'loading') { | |
document.addEventListener('DOMContentLoaded', applyCSS); | |
} else { | |
applyCSS(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment