[Request]: Add a copy/open *clean* link option
Describe the request
Sometimes link posted on Mastodon have utm parameters, or tracking one, or riderect one. It would be nice to have some option to "clean" this link before opening or copy. Something like the option available on Firefox
Implementation Details
- [x] This follows the GNOME HIG.
After many failed attempts, my conclusion is that it's not possible at the moment.
Technical:
What we need:
- To know when a link is right clicked compared to just selectable text
- To know the link that was right clicked, before the context menu shows up and when the 'copy clean link' action is activated
Label widgets are pretty opaque (as we've dealt with in the past for LWW anyway). We cannot access the links ourselves, we cannot change their properties, we cannot know if something right clicked is a link and we cannot get the right clicked link.
Some of the attempts:
- Get whether
link.copyis enabled (the internal action), not possible - Enable our action conditionally by hijacking a secondary click gesture, didn't work
- Decide to just show the 'Copy Clear Link' even if what's right clicked is not a link; couldn't get the right clicked link
So the only option I have in mind is that if the strip tracking parameters setting is enabled, to clear all urls regardless. But that can lead to broken urls.