kheina-com / Blue-Blocker

Blocks all Twitter Blue verified users on twitter.com
Mozilla Public License 2.0
339 stars 28 forks source link

Block Via UI Click #54

Open kheina opened 1 year ago

kheina commented 1 year ago

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

kheina commented 1 year ago

not in scope for 0.2.4 btw, so focus remains there