fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

Brage Fuglseth

I just pasted a Reddit link to share with someone privately here on Mastodon, and got notified by @Tuba that it had removed a tracking parameter from the link! This kind of QoL improvement is what I think takes an app from good to great.

@Tuba At the same time I noticed a mistake in my Norwegian translations of the app, so I've proposed annotating the "Stripped tracking parameters" string with a clarifying comment.

github.com/GeopJr/Tuba/pull/10

GitHubfix(translation): Add context to tracking param string by bragefuglseth · Pull Request #1070 · GeopJr/TubaBy bragefuglseth

@bragefuglseth @Tuba As long as it never removes something it shouldn't remove because it thinks it's tracking, but in fact it is a code that gives access or an affiliate link or anything like that.

@forteller The in-app notification for it has an "Undo" button, so it's possible to mitigate that pretty easily if it happens accidentally. It's not always easy for regular people to know if the tracking param is genuinely useful or not though — that's an unresolved UX question with this kind of feature in general; Firefox also suffers from it.

@forteller @bragefuglseth

The filters are mostly from brave browser's source code and if there's something cryptobros love, is their affiliate links.

(But there's also a switch in settings to turn it off :3
FWIW, Tuba also strips tracking params from every link the user clicks. The idea and filters came from kop316@fosstodon.org who submitted them to Chatty!)

GitHubTuba/src/Utils/Tracking.vala at main · GeopJr/TubaBrowse the Fediverse. Contribute to GeopJr/Tuba development by creating an account on GitHub.

@GeopJr @forteller @bragefuglseth Nice, I was thinking about adding something similar to Moshidon a while ago, mind if I get inspired by your code?

@FineFindus Sure! Though, there are probably better/simplier ways to do it in Java

Just make sure that (stuff we noticed from the MR discussions and revisions we had):

  1. The query param order and capitalization has to stay the same before and after the cleanup
  2. Don't forget about url fragments
  3. Do not touch the query param values at all

Here's some tests: github.com/GeopJr/Tuba/blob/ma

In the stripping code, there's the main stripping method and a fallback. The fallback was from the original Chatty MR but after the above mentioned shortcomings I suggested the GLib Uri one (but kept the fallback just in case it fails). You should follow the main one and use whatever Uri handling library is available!

GitHubTuba/tests/Tracking.test.vala at main · GeopJr/TubaBrowse the Fediverse. Contribute to GeopJr/Tuba development by creating an account on GitHub.

@GeopJr Thanks for the info! I don't think the fallback is needed in our case, since Android's Uri class is very mature. Feel free to take a look at my approach github.com/LucasGGamerM/moshid

Also, as a fun fact, I learned through this that Android actually has a UrlQuerySanitizer, though unfortunately it does not work in this case.

GitHubfeat: remove tracking parameter from URLs by FineFindus · Pull Request #470 · LucasGGamerM/moshidonBy FineFindus