twitter_ad_blocker icon indicating copy to clipboard operation
twitter_ad_blocker copied to clipboard

The ability to block the account being promoted.

Open Zaher503 opened this issue 3 years ago • 4 comments

Hi, I really like your extension and have been using it for a while now. Would it be possible to add the ability to completely block the account that is being promoted and not just hide them? I am only asking because I use twitter on my phone too and I got tired of blocking all of the advertised accounts. It would be great if I can slowly block all of these accounts while I'm on desktop.

Thank you.

Zaher503 avatar May 17 '22 23:05 Zaher503

awesome idea @Zaher503, i’ll look into this today and respond here.

ryanckulp avatar May 17 '22 23:05 ryanckulp

@Zaher503 i clicked around and did some testing.

options

  1. send an ajax request to the block endpoint using JS-accessible cookies: not possible. can't fetch auth header (bearer token) and the request body has another parameter, "impression_id" that i don't know how to generate.
  2. crude scraping-like techniques, for example emulating a click of the '...' > Block > confirm modal. each of these steps would need to hide the relevant DOM elements so your browsing experience isn't affected. probably possible.
  3. POST blocks/create API request - easy but requires a user to make their own twitter API client and paste in a Bearer token.

option 3 requires a few changes. first, a UI for users to optionally input an API token + local storage of the token. second, we'd likely have to migrate this extension's manifest to v3. third, implement new tools like service workers to make API requests from the extension itself.

if anyone wants to start hacking on this, lemme know! will leave the issue open.

ryanckulp avatar May 19 '22 06:05 ryanckulp

This is exacly what I was about to request. :) I've never looked at js so wouldnt be any help but jus wanted to say thanks!

MacsInSpace avatar Jun 13 '22 03:06 MacsInSpace

bout to request. :)

same here

alexguerra avatar Sep 21 '22 12:09 alexguerra