Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

views/tweet: add .author-$user, .retweet-$user to classlist for adblock #718

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

badp
Copy link

@badp badp commented Nov 4, 2022

Please be aware that I literally just installed nim, and that (although this change compiles) I haven't tried actually running this code. I don't even expect this change to be adopted (I don't even use ad-blockers myself), but rather for this to start a conversation on how blocking people on nitter could be implemented (if it should even be supported at all).

The main impetus for this is that I wish to stop being counted as a twitter "daily active user," and yet open links people choose to share with me. Unfortunately, I still lack the mental fortitude not to check out the replies, and regret it immediately afterwards.

Server-side blocking would require an account infrastructure that doesn't exist, or perhaps sending the blocklist as a cookie on every request (at 4,096 chars per cookie, that'd be.... a lot of cookies). Native client-side blocking would require being able to run javascript, something that AFAICT nitter politely asks for in order to enable video playback. This commit relies on the capabilities of existing ad-blocking extensions: just add .retweet-$user and .author-$user to your blocklist. This mechanism is unsatisfactory in more than one way (mobile, desktop Chrome) but it's 🌈 better than nothing ✨

Allow users to control what content they see or don't in their timelines
by exposing author and retweeter information via dedicated CSS classes.

Using adblock extensions is at least a little of a cop out, especially
considered the changes to extensions that Chrome will soon force on
extensions, but it's also the simplest change that will do the trick...
at least on desktop.

Server-side blocking would require an account system to exist, whereas
javascript-side blocking would require javascript to be enabled,
something that nitter doesn't give for granted (see also: video
playback). Javascript-side blocking would also benefit some kind of
change very much like the one I'm making here (the alternative being
scraping the DOM this piece of code is generating).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant