Remix.run Logo
joquarky 2 days ago

Do people still use bookmarklets?

I wrote this one to remove all <iframe> elements, which is where most of the worst distractions live. I mostly only use it when a site has gone too far.

    javascript:(function () {
        const rm = () => document.querySelectorAll('iframe')
            .forEach(f => f.remove());
        let timeout;
        const debouncedRm = () => {
            clearTimeout(timeout);
            timeout = setTimeout(rm, 100);
        };
        rm();
        new MutationObserver(debouncedRm)
            .observe(document.body, {
                childList: true, 
                subtree: true
            });
    })();