79602502

Date: 2025-05-01 20:42:46
Score: 2
Natty:
Report link

I realize that perhaps my answer may not be entirely comparable to the question. But I want to share my experience. I was faced with the need to modify a dynamic page. All methods from this topic did not help me, but the following helped:

const observer = new MutationObserver((mutations) => {
    applyStylesToAllElements();
});

observer.observe(document.documentElement, {
    childList: true,
    subtree: true,
    attributes: true
});

function applyStylesToAllElements() {
    document.querySelectorAll('*').forEach(el => {
        el.style.userSelect = 'text'
    });
}
Reasons:
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Fedor