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.
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