Giter Site home page Giter Site logo

blue-blocker's Introduction

Blue Blocker Logo
Blocks all Verified Twitter Blue users on twitter.com

Usage

Nothing! Just install and say goodbye to all the paid blue checkmarks!

By default, Blue Blocker does not block users you follow or who follow you that have purchased Twitter Blue. You can change this and other settings from the extension context menu found by clicking the extension icon in your browser's toolbar.

Install

Available from Chrome Webstore Available from Firefox Add-ons Available from Microsoft Edge Add-ons

Development

  1. Check if your Node.js version is >= 18.
  2. Run npm install to install the dependencies.

run the command

npm run dev

Chrome

  1. run npm run dev or npm run build
  2. Visit the chrome extentions page
    1. (or enter chrome://extensions/ in the Chrome url bar)
  3. Enable Developer mode in the top right
  4. Click Load unpacked in the top left and select blue-blocker/build folder

Firefox

  1. Run npm run build
  2. Run make firefox
  3. Visit the firefox addon debugging page
    1. (or enter about:debugging#/runtime/this-firefox in the Firefox url bar)
  4. Click Load Temporary Add-on in the top right and select manifest.json in the blue-blocker/build folder

License

This work is licensed under the Mozilla Public License 2.0, allowing for public, private, and commercial use so long as access to this library's source code is provided. If this library's source code is modified, then the modified source code must be licensed under the same license or an applicable GNU license and made publicly available.

blue-blocker's People

Contributors

kheina avatar cooljeanius avatar rougetimelord avatar dependabot[bot] avatar mrawesome avatar suyooo avatar jaredcat avatar psotle avatar meguminsama avatar

Stargazers

 avatar 즈눅 avatar yukineko avatar Victor Lobe avatar Martin Zarate avatar trickmint avatar ezL avatar Glenn Dodds avatar Vincent Privat avatar Zoe avatar Ryan Kennedy avatar Damiano Di Pietro avatar Jacob Hilker avatar toastyfen avatar Emma avatar Thomas Staudinger avatar  avatar Damaged Industries avatar  avatar  avatar  avatar  avatar Akın Özgen avatar Em Do avatar  avatar TrainDoctor avatar Sergio Varela avatar Kayla Tucker avatar kvba avatar  avatar Kot C avatar sadspear avatar Mehdi Saber avatar Saas avatar Paul B avatar Chris avatar Seba avatar Luna Nova avatar Jason Mitchell avatar  avatar Bernhard Döbler avatar James avatar Tomer avatar Tomachi avatar Nick avatar nymori avatar Alen Yohannan avatar Riley Bąkowska avatar Adam Schubert avatar  avatar João Arvana avatar Matt Silverwood avatar Nurlan Zhandullauly avatar /home/fullpwn/Desktop/ avatar  avatar Uldéric Kibongui avatar  avatar  avatar Mitchell avatar Bahy avatar  avatar  avatar Sophia avatar suraj avatar Kie avatar FallCheetah7373 avatar Chuan Hu avatar Juan avatar Jorge Gamarra avatar  avatar Norii avatar Harald Glatt avatar  avatar  avatar Nobody avatar  avatar Amaryllis Kulla avatar Aidan Gill avatar  avatar Mostopha Labib avatar Robert avatar Waleed avatar  avatar Yann avatar Violet (Larson) avatar  avatar Celeste Peláez 🏳️‍⚧️ avatar  avatar Mute avatar  avatar Harshit Choudhary avatar João Paulo avatar luheeslo avatar Ellison avatar Daniele Conti avatar Bruno Rocha avatar barrett avatar Shader Coder avatar Jeffrey J Szczewski avatar Sung Jeon avatar

Watchers

Lucian avatar  avatar  avatar blueyes avatar  avatar Miguel Gonzalez Acera avatar Kostas Georgiou avatar  avatar  avatar

blue-blocker's Issues

Log out

A bug or an overload issue causing account to log out and reset display to the default white screen. I don't know if it's random or caused by too many accounts being blocked/queued at the same time.

Stop Processing Queue When Signed Out

there is a continuing issue where users get signed out, regardless of queue interval, it just happens sometimes. This is acceptable, but just detect when the user is signed out so that the queue will stop processing and not send useless requests

Purge queue

Boundary case where queued accounts are suspended prior to blocking do not clear resulting in repeated bad requests and lockout. More probable issue if backlog is allowed to build over time or as more users are blocked (user will eventually add someone who is suspended inside the time between queueing and blocking).

skip users followed by users I follow

This could be a good option to prevent overblocking:
"skip users followed by users I follow"

If possible also add an option to define the number of followers:
"skip users followed by [n] users I follow"

Edit and View Queue

On my firefox install, it's cleared roughly 1600 blue checks, but there are 2 that it cant clear. The queue frequently drops to 1 then pops back up to 2. I suspect it is trying to block someone and failing, but that means its constantly pinging twitter.

I'd like the ability to view the queue so I can identify the problem accounts, and the ability to either manually remove accounts from the queue (or maybe clear the queue), or have the extension stop trying to block an account after a number of attenpts then remove them from the queue.

add option to hide block notifications

Great addition injecting notifications of users being blocked, however it can be a bit disruptive for some people so I'd like an option to not display those popups. This should be pretty easily done by adding another checkbox.

Have Only One Queue Consumer Between Tabs

As the logic is set up now, every tab will have it's own consumer, basically increasing the speed with which the queue is consumed by the number of twitter tabs the user has open. this is fine for an MVP, but will likely hit the rate limiter if the user doesn't know this is happening (most users)

eventually, the tabs will need to communicate between each other to select a single tab to consume the queue. if that tab is closed or crashed, another tab should begin consuming the queue

Problems signing in while extension is enabled

Steps to reproduce:

  1. Enable blue-blocker
  2. Log out of twitter
  3. Log in
  4. Log in alert is sent to notifications but after the page reloads it asks you to login again

Tested using: Firefox extension

Run in search results directly

Being able to run this on search results directly would allow a user to deploy a 'worldcode' script such as '-filter:verified filter:blue_verified filter:replies' to block substantially all verified accounts. [This sounds like a good thing to empower]. The script used here https://gist.github.com/adalinesimonian/b52a753c9fd6c176598745df01ba12dc accomplishes this in a direct manner, but without this addon's flexibility; between the most recent popover method and the machinegun method used earlier this week, there's a strong synergy with this extension.

Logged out when blocking too many accounts

Is there anyway this problem can be mitigated? I don't mind just logging back in again but a lot of users will probably find this off putting. I know the extension already has a queue system, so maybe it can be improved to reduce the likely hood that Twitter will log you out.

1 million followers option prevents blocking accounts with 0 followers

If you have the "skip users with 1M+ followers" option enabled and come across a blue user with 0 followers, the console will log an exception for them erroneously indicating they have 1M+ followers.

This is possibly due to this part of shared.js:

options.skip1Mplus && (user.legacy.followers_count > 1000000 || !user.legacy.followers_count)

I'm not sure what was intended by the last part of that expression (check for undefined value maybe?). But in JavaScript, !0 evaluates to true.

Feature request: support Twitter mobile

Please build in support for mobile.twitter.com. I primarily use the mobile site via Firefox Nightly, and would love to use the extension to block Twitter Blue users on the go.

Abandoned?

Hasn't been an update in some time. @DanielleMiu let us know if you're still maintaining this...

Support Manifest V2 for a little longer

From https://extensionworkshop.com/documentation/publish/distribute-manifest-versions/:

It is not possible to create a version of an extension that is MV2- and MV3-compatible. Therefore, you need a way of distributing both types of extension if you need to continue supporting older clients, such as Firefox ESR. (Firefox ESR 102.x, the extended support release for enterprises – large companies and organizations – is supported until September 2023, when the ESR release moves to a version supporting MV3).

Would it be possible for Blue Blocker to support MV2 until September? I know it's a bit of an ask but Debian Stable for example which is releasing soon will be stuck with MV2 until September at least.

Option to mute AND block

For a couple reasons it may be preferable to both block AND mute.

  1. Algorithmic reasons: block/mute equivalent and stack, would be nice to bury them twice.
  2. Visibility reasons: Twitter seems to inconsistently hide blocks and mutes on their own, especially if there's a bluecheck reply downthread, but sometimes block-mutes get cleared from thread view with no problem at all, you don't even have to hide blocked replies.

Have to manually enable permission to access twitter? (on Firefox)

Sorry, I don't know what the reason is.

But when I add this extension to my Firefox, it doesn't work to start with. If I pin the extension icon, it gets a blue dot and a tooltip saying I need to grant permissions. If I go to manage this specific extension, and go to permissions, the permissions for twitter.com are not enabled. Enabling these permissions then lets the extension work as expected.

I might have previously installed and then removed the extension. Maybe that caused it?

Feature request: Follower-count threshold

Personally the only insufferable stuff I'd actually want to block comes from accounts with subatomic follower counts being pushed to the top of the replies. There's this list of Twitter Blue subscribers with <2000 followers but it's 4 months old which makes it largely useless to me.
Since there's already an optional check for accounts with >1M followers, could another optional check be added to only block accounts under a custom number of followers?

Add option to ignore accounts that restored their blue check by the "put blue check in profile comment" trick

Apparently if you put the words "blue check" in your profile comment, you can restore your legacy blue check without paying for Twitter Blue: https://twitter.com/kenklippenstein/status/1653084206631714816
I have seen several other accounts saying this as well. It might only be for accounts that previously had a legacy blue check, though? (I'm unable to test for myself to verify, though, since Twitter doesn't want to seem to save any edits I make to my profile lately...)

Does secret behavior.

It blocks people with NFT avatars, which is not disclosed in the title or description. This should be either a separate option or a separate plugin.

BlueBlocker fails to block after logout and log back in

image

I get this error when BlueBlocker tries to run a queued block that was queued before my current login session. This might be because headers is pre-calculated and stored in the queue, which means when the CSRF token changes the queued blocks are all broken. Not sure if this is the case though.

Add user feedback for twitter users being blocked

Thank you so much for this extension. I think part of the reason why the google reviews are a bit low is due to the lack of user feedback.

I think if we displayed the block queue in the popup it would be more apparent so people don't have to open dev tools to see the logs.

image

Add Blocked UI Element

Add a popup element on twitter to show recently blocked users, add an undo button that unblocks or unmutes the user and adds them to an allowed list persisted in api.storage.sync (or maybe a proper database? idk if addons have those)

Start Queue Consumption On Load

Currently, queue consumer is only started when a request is received and a new user is added to the block queue. however, now that the block queue is stored in localstorage, it's possible for the queue to be populated on initial load

pause collecting while still blocking queue

It would be great to have a button to pause collecting new usernames while still letting the queue run. Some blue checks are more annoying than others, and it would be nice to be able to fill up a queue in search and then go back to my timeline without adding unintentional blocks.

Remove Blocked Users from Dom

when a normal block occurs through the UI, the tweet blocked as well as all tweets in the timeline or comments are removed from the page. this logic should be duplicated in the addon, wherever possible

adding this here for posterity, Blue Blocker does not currently support this, but should be able to work fine in conjunction with https://github.com/BlueLiteBlocker/BlueLiteBlocker, though I have not personally tested it

Autoscroll

Enabling an autoscroll would speed up loading names into the queue and prevent issues where threadloading stalls in cases where threads aren't being actively refreshed. I use a macro that jams the spacebar down because I'm both very dumb and very lazy, and it works for me. But I know a lot of people who are either dumber or lazier than me, and this would be helpful for them while also increasing automation by a large factor.
Sequential scrolling by x /<200 pixels has a couple edge cases with frustrating outcomes - when ads obstruct certain ranges of the page, and near the bottom of a thread but before it loads new tweets: persistent scroll overcomes these cases consistently.

Auto-adding blue ticks to a list instead of blocking?

a nice bit of double punishment would be the ability to add all blue ticks to a user-predefined list (let's call it "Blue Tick Scum", for example) so they get a notification that's happened. They can have their piss boiled for a few days before I switch your main extension back on and actually block them.

pretty please

Make queue interval configurable

#10 made it so users who are to be blocked get added to a queue and then each user in the queue is blocked in 5 second intervals. This is to avoid being signed out by the API, however I find 5 seconds is a bit too long, especially on threads with many blue verified users.

In my testing even lowering it to 1.5 seconds prevented the sign out most of the time, however I think it would be better to just have this interval be configurable.

Alternatively the 5 second interval would not be as bad if the queue was stored independent of the page, so as a user is navigating around Twitter the queue will continue to be processed in the background, but I think this might be more difficult to implement.

Twitter returning legacy checkmark and labelling it as Twitter Blue

Twitter is returning legacy checkmarks on certain users (threshold unknown) and purposely labelled it as Twitter Blue.

An article relevant to this issue can be found here as many celebrities are trying to remove their checkmarks: https://www.avclub.com/celebrities-now-working-to-remove-their-apparently-mand-1850366148

However, using filter:verified and filter:verified_blue still works to differentiate legacy checkmarks and Twitter Blue checkmarks. Evidence: Maybe this can be used to differentiate legacy and blue checkmarks.

Example of filter:verified_blue
example of filter:verified_blue

Example of filter:verified
example of filter:verfieid

Block Via UI Click

I just got a really stupid idea and honestly I don't even know if it would work, but I want to look into it.

instead of creating a mock ui request manually via ajax and formdata, would it be possible to use css and/or xpath selectors to find the tweet on page and mock a click on the ui element that performs the block normally?

this way the built in frontend would be handling everything for us in terms of removing elements from the dom, authentication, request building, etc, etc.

main issue with this would be what if the user has navigated away from the page containing the tweet and/or user that actually displays the block button? in this case we would fall back to the previous logic of using ajax and formdata, but it would force us to maintain more bullshit.

https://gist.github.com/adalinesimonian/b52a753c9fd6c176598745df01ba12dc

Add option to ignore accounts that have manually been unmuted/unblocked previously

Sometimes this extension makes a mistake and blocks (or in my case, mutes) accounts that I'd already unblocked/unmuted previously. I would like for this extension to remember unblocks/unmutes and then remember to not block/mute them again if it encounters them again (or, if this is already supposed to be how the extension behaves, it should be documented more clearly)

Does not appear to block Twitter Blue users in comments consistently.

I scrolled through the comments on a Musk tweet to test the extension with the console open and the success rate was around 20%. It appears that the block event is more consistent by visiting the users profile and then opening a tweet or sometimes two.

The log message for blocks is also always blocked USER (@USER) due to NFT avatar. regardless if they actually do have an NFT avatar or not.

Block requests queued before signout erroring when signed back in

I ran into an issue where I was having a queue of blocks processing when I was logged out (probably block rate limiting), but when I logged back in and tried to kick it off again, all blocks that were trying to process were returning 403 errors, the body of the response being that the CSRF header didn't match.

(I'm going to note in advance that I'm in that zone here of "knows enough to be dangerous", so, apologies if I've missed something about how this works and my theories are a little bunk.)

From the investigation I was able to do, what I think happened is that the blocks were queued with the header block from one session, including the CSRF token, but after signing back in, processing started again sending those requests using the cached but now invalid CSRF token.

(My investigation here was a little limited because I'm kinda wary about letting the thing just keep flying sending invalid block requests.)

I was able to get blocking working again by removing and reinstalling the extension in chrome, which suggests to me that I probably could have also let it send however many failed block requests and it'd eventually come back to me. However, there might need to be some sort of recovery here that doesn't require refreshing the extension or having to wait for the queue to stream out all the doomed requests, like a manual button for clearing the queue, something that watches the return of the block requests firing to handle when errors start happening, etc.

Upgrade Firefox Manifest To Version 3

this should allow the repo to be much more linear, merging the firefox and chrome folders and reducing the need to have separate codebases for each platform. it may also mean being able to remove the second manifest entirely and using a single shared manifest.

Errors blocking when using tweetdeck.twitter.com

I noticed that, when browsing through https://tweetdeck.twitter.com, users are being queued properly, but the block call fails consistently and the users remain queued.

If I switch to https://twitter.com, then those queued users are blocked correctly.

I do see errors in the console, but nothing in the error message indicates what exactly failed although I suspect it's a cross-domain problem.

[Blue Blocker] error: 
error { target: XMLHttpRequest, isTrusted: true, lengthComputable: false, loaded: 0, total: 0, srcElement: XMLHttpRequest, currentTarget: XMLHttpRequest, eventPhase: 2, bubbles: false, cancelable: false, … }
​  bubbles: false
  ​cancelBubble: false
  ​cancelable: false
  ​composed: false
  ​currentTarget: null
​  defaultPrevented: false
  ​eventPhase: 0
  ​explicitOriginalTarget: XMLHttpRequest { readyState: 4, timeout: 0, withCredentials: false, … }
  ​isTrusted: true
  ​lengthComputable: false
  ​loaded: 0
  ​originalTarget: XMLHttpRequest { readyState: 4, timeout: 0, withCredentials: false, … }
  ​returnValue: true
  ​srcElement: XMLHttpRequest { readyState: 4, timeout: 0, withCredentials: false, … }
  ​target: XMLHttpRequest { readyState: 4, timeout: 0, withCredentials: false, … }
  ​timeStamp: 0
  ​total: 0
  ​type: "error"
  ​<get isTrusted()>: function isTrusted()
  ​<prototype>: ProgressEventPrototype { lengthComputable: Getter, loaded: Getter, total: Getter, … }

[shared.js:178:11](moz-extension://978c7cc8-6d56-437c-9a99-3bb5693eac96/shared.js)
    BlockUser moz-extension://978c7cc8-6d56-437c-9a99-3bb5693eac96/shared.js:178
    (Async: EventListener.handleEvent)
    BlockUser moz-extension://978c7cc8-6d56-437c-9a99-3bb5693eac96/shared.js:177
    CheckBlockQueue moz-extension://978c7cc8-6d56-437c-9a99-3bb5693eac96/shared.js:142
    (Async: promise callback)
    CheckBlockQueue moz-extension://978c7cc8-6d56-437c-9a99-3bb5693eac96/shared.js:136
    (Async: setTimeout handler)
    sync moz-extension://978c7cc8-6d56-437c-9a99-3bb5693eac96/models/queue_consumer.js:55
    _timeout moz-extension://978c7cc8-6d56-437c-9a99-3bb5693eac96/models/queue_consumer.js:52

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.