theAlinP / twitter-link-deobfuscator

A Firefox add-on that restores the original destination of the links (from tweets) that have been shortened by the Twitter servers. It only runs while browsing Twitter's website (twitter.com).
https://addons.mozilla.org/en-US/firefox/addon/twitter-link-deobfuscator/
MIT License
36 stars 5 forks source link

All websites shortened links #14

Closed privacyguy123 closed 3 years ago

privacyguy123 commented 3 years ago

Any way to get this addon to work on all sites with t.co, bit.ly links on the page for e.g.?

theAlinP commented 3 years ago

Most likely not. I will think about it and get back to you.

theAlinP commented 3 years ago

Sorry for the late follow-up, I forgot about this.

In the Twitter web app, the original URLs are included in the data received from the Twitter servers and some eventually make their way into the page in one form or the other. TLD takes those URLs and updates the text links and Twitter Cards with the original destinations. The t.co links from other sites almost certainly don't contain the original URLs.

The add-on can't clean the bit.ly or any other shortened links, not even in its current form, not even on the Twitter website. That is beyond the scope of the add-on. Expanding the bit.ly or other links would require a completely different approach. I could update the add-on to make a request to the Bitly servers and obtain the expanded URL but if your browser makes that request it would be almost like clicking on the shortened link yourself. The Bitly servers would still obtain a lot of tracking data, or as they call it "more than 20 data points on every click—like geographic data and information on referring channels". If I could spoof some of data like the above mentioned "referring channel", I could not do the same with the IP address or other data Bitly may gather.

Completely circumventing that would only be possible with the help of a separate web app. That could help cleaning the t.co links from other sites as well. Assuming I build one, and that is a big IF, I would then need to find a web host. I can't really purchase a paid plan just for this so I would need to use a free plan. The problem with free plans is that they usually come with limitations. Once that limit is reached, all the subsequent calls will be rejected and the add-on would suddenly stop working—for all the users.

Because the great majority of tweets are on Twitter and because developing and maintaining the app to clean the links from links outside Twitter would require so much work I won't do it. Not right now and maybe never.