pull down to refresh

I just learned that Shield allows you to run custom scriplets!

So if you save this as a custom scriptlet at brave://settings/shields/filters:

window.addEventListener('DOMContentLoaded', () => {
    function removeCollapsedComments() {
        document.querySelectorAll('div[class*="comment_collapsed"]')
            .forEach(node => {
                if (node.textContent.startsWith("reply from someone you muted")) node.remove()
            }
        )
    }

    // Run on initial page load
    removeCollapsedComments();

    // Watch for dynamically loaded content
    const observer = new MutationObserver(removeCollapsedComments);
    observer.observe(document.body, { childList: true, subtree: true });    
})

and then save this custom filter:

stacker.news##+js(user-stackernews.js)

it also works!

201 sats \ 6 replies \ @CindyKate 12h

Thank you!!!

reply
191 sats \ 5 replies \ @ek 12h

No worries!!! I hope you can read JavaScript though, because you shouldn't trust me haha

reply
201 sats \ 4 replies \ @CindyKate 11h

Got myself a second opinion

reply
170 sats \ 3 replies \ @ek 11h

Wow, impressive use of ChatGPT

reply
155 sats \ 2 replies \ @CindyKate 11h

Huh? Everyone does this.

reply
170 sats \ 1 reply \ @ek 11h

First time I’ve seen someone do that!

reply
222 sats \ 0 replies \ @CindyKate 11h

It's very useful for when you feel light imposter syndrome and be more certain about your own capabilities.

reply

Is this running on every single site we go to?

reply
201 sats \ 2 replies \ @ek 11h

No, the custom filter scopes it to stacker.news

reply
191 sats \ 1 reply \ @jakoyoh629 11h

stacker.news##+js(user-stackernews.js)

This line handles that? Thanks

reply
123 sats \ 0 replies \ @ek 11h

Yes!

reply
24 sats \ 2 replies \ @optimism 11h

only what you specify in the custom filter.

reply
200 sats \ 1 reply \ @jakoyoh629 11h

There?

reply

On a new line and the script in the section below it.

reply
101 sats \ 0 replies \ @CindyKate 11h
it also works!

Confirmed.

reply
70 sats \ 1 reply \ @optimism 11h

This is why we must tag @ek more often - I just got rid of Wildmonkey.

Thanks ek.

reply
101 sats \ 0 replies \ @ek 10h

reply