Created
April 24, 2025 11:51
-
-
Save fabiensebban/d5c9213d657689f3b0d6db277ff3f778 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
// This snippet hides the add to cart and selector from the wishlist page | |
document.addEventListener('DOMContentLoaded', () => { | |
const callback = () => { | |
Array.from(document.querySelectorAll('ooo-wl-select-option')).forEach((item) => item.style.display = 'none'); | |
Array.from(document.querySelectorAll('ooo-wl-button-add-to-cart')).forEach((item) => item.style.display = 'none'); | |
} | |
const observer = new MutationObserver(callback); | |
observer.observe(document.documentElement, { attributes: true, childList: true }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment