zlacker

My uBlock Origin filters to remove distractions

submitted by mig4ng+(OP) on 2023-09-20 13:53:31 | 469 points 185 comments
[view article] [source] [go to bottom]

Repository with my filter lists that block some distractions from sites I want to keep using.

I am pretty ruthless removing distractions from my life (e.g. no Instagram, Facebook, TikTok), but some tools I'd like to keep using some parts of it. E.g. Twitter/X, I dislike the feed but I like reading some threads that are shared here or on blog posts. Same for YouTube, I enjoy some videos but I do not want recommendations when I finish the video I was watching.

Feel free to suggest more, open issues, pull requests or send me an email :)


NOTE: showing posts with links only show all posts
8. runjak+Z4[view] [source] 2023-09-20 14:17:52
>>mig4ng+(OP)
If you use uBlock Origin, did you try to submit these filters to the uBlock Annoyances[1] or EasyList Annoyances lists before starting up this project?

That would help far more people that starting up yet another Annoyances list.

1. https://github.com/uBlockOrigin/uAssets

◧◩◪
9. perihe+35[view] [source] [discussion] 2023-09-20 14:18:12
>>mig4ng+k4
I don't know if they still do it, but at the time Twitter charged money to display user avatars in a larger size, and styled as a hexagon. I think they were NFT tie-ins or something? They were difficult to ignore, so I wrote a snippet to turn hexagons back into circles.

[edit]: >>30012904 ("Twitter Rolls Out NFT Profile Pictures")

16. rschia+g9[view] [source] 2023-09-20 14:36:03
>>mig4ng+(OP)
There is also https://letsblock.it/filters, a collaborative repository of uBlock content filters, to which I encourage you to contribute your own ones.
18. waxali+m9[view] [source] 2023-09-20 14:36:22
>>mig4ng+(OP)
I use something similar to this, the only differences are because my use case is privacy protection and avoiding algorithmic feeds. I use the Redirector extension for Firefox so that it redirects e.g. Youtube, Twitter, and StackOverflow links to the corresponding alternative frontends Piped, Nitter, and AnonymousOverflow. You can find maintained lists [1] [2] of such projects and their instances. Mostly they are FOSS and privacy-respecting, and they have distraction-free frontends because it's a helpful coincidence of being ethical software.

[1] https://github.com/digitalblossom/alternative-frontends [2] https://farside.link

◧◩
35. db48x+Pf[view] [source] [discussion] 2023-09-20 15:04:28
>>pimlot+S1
Here are the rules I’ve been using for Stack Exchange; you can see that I have been doing this for a while. Some of these may no longer even be necessary…

    ! 5/8/2018, 9:16:29 AM https://emacs.stackexchange.com/questions/13080/reloading-directory-local-variables
    emacs.stackexchange.com###overlay-header
    ! 3/31/2020 https://emacs.stackexchange.com
    emacs.stackexchange.com###divQuestionFollowFeaturePopover
    ! 2021-04-14 https://emacs.stackexchange.com
    emacs.stackexchange.com##.js-teams-promo
    ! 2021-08-14 https://emacs.stackexchange.com
    emacs.stackexchange.com###hot-network-questions
    ! emacs.stackexchange.com###sidebar
    ! 2021-10-01 https://emacs.stackexchange.com
    emacs.stackexchange.com##.js-create-team-cta
    ! 2022-09-18 https://emacs.stackexchange.com
    emacs.stackexchange.com##.s-sidebarwidget:not(.js-review-actions)
    emacs.stackexchange.com##.js-feed-link
    ! 2022-12-18 https://emacs.stackexchange.com
    emacs.stackexchange.com##.icon-winterbash
    ! 2023-07-28 https://emacs.stackexchange.com
    emacs.stackexchange.com##.js-announcement-banner
37. hedora+kh[view] [source] 2023-09-20 15:10:50
>>mig4ng+(OP)
Tangentially related: Has anyone tried the Orion Browser by Kagi for iOS?

https://browser.kagi.com/

They claim to support Firefox and Chrome extensions (specifically, uBlock Origin). It's in beta. I'm surprised Apple hasn't blocked it yet, but I'd consider paying for a developer account just to install it on my phone (assuming it works).

38. perihe+Th[view] [source] 2023-09-20 15:13:46
>>mig4ng+(OP)
Tangentially: after you've blocked a very large number of ads and sidebars, one useful enhancement is to expand whatever text elements remain, to regain use of all that now-empty whitespace. Something like so:

    :xpath(//main/div):style(min-width: 80% !important)
(I've been looking at going a step further for some sites, by annotating a "column-count:" [0] rule and making the screen look like a newspaper. (Narrow columns for readability—multiple columns for "scan-ability"). Unfortunately, there's a lot more fiddling and tuning to this than I expected: it doesn't automagically work in the way you'd hope. Modern website DOM layouts are basically Superfund sites).

[0] https://developer.mozilla.org/en-US/docs/Web/CSS/column-coun...

[late edit]: Here's a minimal example of "column-count:" injected by uBlock (on a website where it sort-of works)—this is what I'm trying to coerce other websites into looking like:

https://i.ibb.co/k3bRwhP/example-1.webp

    theguardian.com###maincontent:style(margin-left: -28vw !important; min-width: 90vw !important; column-count: 4 !important)
    theguardian.com##div:style(border: none !important)
41. citrus+Li[view] [source] 2023-09-20 15:17:15
>>mig4ng+(OP)
Love this! I've been working on one for pull quotes: https://codeberg.org/oneirophage/filter-list-pull-quotes
42. Always+Ri[view] [source] 2023-09-20 15:17:36
>>mig4ng+(OP)
This is cool. I did something similar at one point. Unfortunately these websites change their basic layout so often that it felt like these fixes would work for 1 month max then I'd have to configure again.

I ended up moving to news feed eradicator. https://chrome.google.com/webstore/detail/news-feed-eradicat...

I let myself use reddit for 5 minutes every morning. It auto blocks the feed when those 5 minutes are up. Every other site I just leave blocked.

◧◩
49. mhasbi+Yl[view] [source] [discussion] 2023-09-20 15:32:48
>>pimlot+S1
There's https://github.com/httpjamesm/AnonymousOverflow. I made https://doublefault.mhasbini.com/ before I knew about it. On the plus side it keep default aesthetics.
56. i13e+Bo[view] [source] 2023-09-20 15:45:31
>>mig4ng+(OP)
You should submit these rules to https://letsblock.it ! AFAIK their distractions rules really only cover YouTube
◧◩◪
58. ronjou+4p[view] [source] [discussion] 2023-09-20 15:47:56
>>mig4ng+ee
Not OP, but here's a screenshot illustrating what I personally typically do on sites I use a lot: hide things, make things low opacity until hovered, add a dark mode if missing. https://imgur.com/a/tCFkVzK

EDIT should have installed uBlock on the left/default browser for a fair comparison. Oh well, you get the idea :)

62. noname+Mq[view] [source] 2023-09-20 15:56:15
>>mig4ng+(OP)
Arc has native support for cosmetic improvements. Those are called Boosts and you can interactively create your owns in just a few clicks, and also add custom CSS/JS if needed.

I use this extensively to declutter/dedistract most websites I visit: Facebook, Twitter, Reddit, Medium, Gmail, YouTube, and so on. It's a real life-changer!

See the Boosts shared by other users here: https://arc.net/boosts

◧◩
67. db48x+xv[view] [source] [discussion] 2023-09-20 16:18:08
>>shortr+e4
Before: <http://db48x.net/temp/Screenshot from 2023-09-20 09-14-36.pn...>

After: <http://db48x.net/temp/Screenshot from 2023-09-20 09-14-26.pn...>

◧◩◪◨⬒⬓
86. ronjou+LO[view] [source] [discussion] 2023-09-20 17:45:52
>>db48x+zN
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.

◧◩◪◨
93. tpowel+841[view] [source] [discussion] 2023-09-20 18:44:40
>>eatsyo+321
I like 1Blocker [1] and Hush [2].

[1] https://apps.apple.com/us/app/1blocker-ad-blocker/id13655310...

[2] https://apps.apple.com/us/app/hush-nag-blocker/id1544743900

◧◩◪◨
94. nunSpQ+k61[view] [source] [discussion] 2023-09-20 18:52:19
>>eatsyo+321
1Blocker has been solid for me for a couple of years now. I use it on my i-devices and Macs.

https://1blocker.com/

◧◩
103. mig4ng+Ab1[view] [source] [discussion] 2023-09-20 19:15:24
>>aendru+gq
These are awesome, feel free to contribute to the StackOverflow PR in the repository: https://github.com/mig4ng/ublock-origin-filters/pull/4
◧◩◪
104. input_+Pb1[view] [source] [discussion] 2023-09-20 19:16:23
>>mig4ng+3f
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.

◧◩◪
105. mig4ng+Vb1[view] [source] [discussion] 2023-09-20 19:16:53
>>mxmlnk+oa1
These with generated ids and classes might be hard to maintain. If you like to change those to the classes/ids that are human readable and easy to maintain, and comment them, feel free to contribute them here: https://github.com/mig4ng/ublock-origin-filters/pull/4

Thanks for sharing.

◧◩◪◨
122. latexr+6u1[view] [source] [discussion] 2023-09-20 20:39:49
>>eatsyo+321
I recommend 1Blocker. One feature that is rarely mentioned is they can also block some ads in apps and not just Safari, by using a VPN profile which filters trackers locally.

https://1blocker.com

◧◩◪◨⬒
123. latexr+Mv1[view] [source] [discussion] 2023-09-20 20:47:46
>>mig4ng+tk1
> Hope Arc and Orion eventually decide to go open source.

From Orion’s FAQ:

> Is Orion open-source?

> We’re working on it! We’ve begun with some of our components and intend to open more in the future.

> Forking WebKit, porting hundreds of APIs and writing a browser app from scratch has been challenging for our small team. Properly maintaining an open-source project takes time and resources we’re short on at the moment, so if you want to contribute at this time, please consider becoming active on orionfeedback.org.

https://browser.kagi.com/faq.html#oss

◧◩◪
124. kup0+9y1[view] [source] [discussion] 2023-09-20 20:58:29
>>mig4ng+Ce1
I didn't create them myself, to be clear, I originally got them from here and have adjusted over time (some comments on this thread / other similar threads discuss the changes necessary due to breakage): https://www.reddit.com/r/uBlockOrigin/comments/143mdqv/code_...

I'll come back later when at home and post the rules I currently use as I've had to manually block other things (new carousels showing up in recommended, etc)

◧◩
134. mig4ng+DG1[view] [source] [discussion] 2023-09-20 21:42:01
>>Bitwis+lr
Created an issue regarding this: https://github.com/mig4ng/ublock-origin-filters/issues/5
145. SushiH+lR1[view] [source] 2023-09-20 23:10:15
>>mig4ng+(OP)
For read only I really like these privacy friendly alternatives:

Twitter, completely skinned down to just the content and no login nags:

Nitter - https://nitter.net - https://github.com/zedeus/nitter

Youtube, also very skinned down and you can also collapse recommendations by default etc.:

Piped - https://piped.video - https://github.com/TeamPiped/Piped

Invidious - https://invidious.io - https://github.com/iv-org/invidious/

Stackoverflow, also completely skinned down to just the content and nothing more:

AnonymousOverflow - https://code.whatever.social - https://github.com/httpjamesm/AnonymousOverflow

For all of these I use LibRedirect to redirect the original pages to the open source/privacy friendly frontends:

https://libredirect.github.io/

◧◩◪◨⬒⬓
165. userbi+Jl2[view] [source] [discussion] 2023-09-21 04:18:48
>>ehPRet+UR1
The FBI agrees: >>34916239
◧◩◪◨
169. Diskut+sF2[view] [source] [discussion] 2023-09-21 07:40:42
>>smegsi+Tm2
It's the bad one.

Stylus is the good one https://add0n.com/stylus.html

◧◩◪
171. 8organ+rL2[view] [source] [discussion] 2023-09-21 08:26:55
>>mig4ng+KF1
See: https://en.wikipedia.org/wiki/Kill_file
◧◩◪◨
174. perihe+kR2[view] [source] [discussion] 2023-09-21 09:11:48
>>Within+TK2
That works too!

    @-moz-document url-prefix(about:reader) {
      .container {
        column-count: 4;
        min-width: 85vw !important;
        margin: 0 50px 0 50px;
      }
    }
https://i.ibb.co/7XT4zfs/example-2.webp

It's chrome/userContent.css in the Firefox profile subdirectory, enabled by the about:config flag toolkit.legacyUserProfileCustomizations.stylesheets.

◧◩◪◨
180. dredmo+1n3[view] [source] [discussion] 2023-09-21 13:10:05
>>smegsi+Tm2
Gah! I meant "Stylus".

The name similarity means I keep getting them confused. Including repeatedly on HN comments.

And yes, I do know the difference: <>>36859978 >

◧◩◪◨⬒⬓
182. latexr+Np4[view] [source] [discussion] 2023-09-21 17:38:02
>>wruza+ll2
See “Firewall & other VPNs” on their FAQ: https://support.1blocker.com/en/articles/6436227-firewall-ot...
[go to top]