Live data from Hacker News

My uBlock Origin filters to remove distractions

github.com

111–120 of 190 posts

Re: My uBlock Origin filters to remove distractions

#111
post #36

Earlier quoted context omitted.

Will try it and might add it too, I find those annoying. Thanks!

FYI you can turn those off in Google's account settings: https://support.google.com/accounts/thread/219332922/how-to-... Which of course implies that you have to be logged into Google for it to work, doesn't apply to incognito windows, etc.

Just did this, thanks. But having it in ublock is good too :)

I have added the rule to the repository

Re: My uBlock Origin filters to remove distractions

#112
post #88

Earlier quoted context omitted.

There are better ways to do it. For example, you can match elements containing specific text, such as the text that introduced the annoyance. On NewEgg you might match the text “Download our app” and use it to remove that whole box.

Yup yup. - Standard CSS (for userContent.css): https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_s... - uBlock Origin: https://github.com/gorhill/uBlock/wiki/Static-filter-syntax & https://github.com/gorhill/uBlock/wiki/Procedural-cosmetic-f... Still, sometimes it's difficult/impossible to make a reliable filter, and in such cases I'd rather not have it than have a brittle one.

Yes, I feel the same. Even though I still have some brittle rules, I avoid most and prefer filtering for specific text or classes/ids and find the correct element from there. Before I did not use uBlock to filter elements that much because I used the filter.

I wonder if you have your filter rules open source or available somewhere. Please share.

Re: My uBlock Origin filters to remove distractions

#113
post #83

Using rules to completely block shorts from appearing in any YT feeds (and rules to fix the feeds so they don't look broken afterwards) has been great. YT breaks it from time to time with a UI update, but it's something I'll always use. I hate YT Shorts

Share yours on the repo via issue/PR or share them here. Thanks!

Re: My uBlock Origin filters to remove distractions

#114

Mostly I'm using one of the default uBlock origin ones, but custom rules that have made (desktop) Facebook much pleasanter for me: www.facebook.com##div:nth-of-type(8):has-text(Suggested for you) www.facebook.com##div:nth-of-type(8):has-text(Reels and short videos)

I don't really use facebook these days, but thanks for sharing. I might add them if I ever step into a facebook post that I want to see and they annoy me :)

Re: My uBlock Origin filters to remove distractions

#115

I've written so many of these. Any reason you chose uBlock over something like userstyles? I'd like to open source/release my styles but I'm not sure which is the best choice. uBlock is great for blocking things from loading (like images) but for visual updates I prefer CSS.

I am just using it to remove elements, not visual tweaks, at least for now.

Also, I try not to have many configurations/extensions extra that I have to install in a new machine. As I did not find a good way to manage these configs as code.

Re: My uBlock Origin filters to remove distractions

#116
post #33

I do a lot of the same things to remove sidebars, navigation, suggestions, search, etc from various sites. There are a couple of web comics where I nuke everything but the image and the next/previous navigation links (Order of the Stick, Schlock Mercenary, etc).

Feel free to share them in the repository via PR, issue, or here :) Thanks.

Re: My uBlock Origin filters to remove distractions

#118
post #71

Personally, I can't stand how distracting YouTube thumbnails are. I found this list to block them from the sidebar when watching videos. ! Hide all of the recommended videos on the right side of the page, except for the first up-next video. ! If you have a tall monitor you may need to add more entries, this blocks the initial list on most resolutions. www.youtube.com###items > .ytd-watch-next-secondary-results-render…

I’m not very familiar with YouTube but can’t that enormous list be condensed to youtube.com###related?

Yes, you can replace it with:

www.youtube.com###items > .ytd-watch-next-secondary-results-renderer.style-scope:nth-of-type(n+2)

This will block the 2nd item and onwards. Note, YT seems to use display:none for behaviour and will fetch up to 160 records for every page, 20items at a time.

Re: My uBlock Origin filters to remove distractions

#119

Thanks! I do this all the time too :) . Makes for a more pleasant / less cluttered experience on sites I use a lot. I'll add that another thing that is pretty easy to do is to add a Dark Mode to websites that don't have one. All you need is a userContent.css/uBlock rule like @media (prefers-color-scheme: dark) { body { background-color: #111 !important; color: #eee !important; } /* etc, more stuff here depending on s…

Thanks for sharing. I don't use Dark mode but someone might be interested in this!
Post reply on HN