Closed ThiccOwl closed 1 year ago
I am so sorry, this is my first time trying to actually post/participate in GitHub at all, so if I am doing anything wrong/posting wrong or have the wrong place, tag or flair or anything the like I apologize and please correct me!
Hello and welcome to GitHub! Thank you that you took the time for this detailed feature request / bug report 😃
- Could Leon theoretically handle these weird shortened Reddit links, the official apps puts out? Or is that not all what Leon is intended for/I misunderstood everything?
Theoretically yes but since this is a short URL Leon would have to perform a network request since only the Reddit server knows the full URL. There were feature requests before regarding TikTok and Amazon short URLs but ultimately we decided that Leon should not perform network requests. Please have a look at this discussion.
- When you have the long browser reddit link, can the last bit after the "?" in the URL, as shown above, also be stripped? Or am I just doing something wrong?
It certainly can be stripped if the URLs still works, which I assume. Currently Leon only has Reddit sanitizers for out.reddit.com
and click.redditmail.com
domains but we can certainly add a sanitizer for reddit.com
as well!
(P.s. May I maybe ask, what the two toggles "Decode URL" and "Extract only URL" are for? Should I have turned on either, in order to process the mentioned short reddit link better? Or something like that?
I tried to find an explanation on the toggles, in order to not be the annoying person asking basic stuff, wasting time, but unfortunately I couldn't find anything... So just in case (very very optionally!) could someone maybe enlighten me, what these toggles do, even if it is really basic/dumb?)
Sure, I can explain what these two toggles do:
"Decode URL" means to decode the URL based on percent-encoding. This was a feature request some time ago. Some URLs are encoded like that and this toggle will decode them.
"Extract only URL" only extracts the URL from the input source. Imagine for example sharing a Netflix link to someone. It usually contains a prefixed text like "I found this show on Netflix...". So this toggle removes everything except the URL.
We should probably add some explanations behind a question mark icon or so to the toggles.
@all-contributors please add @ThiccOwl or ideas
@svenjacobs
I've put up a pull request to add @ThiccOwl! :tada:
Hi there!
I am so sorry, this is my first time trying to actually post/participate in GitHub at all, so if I am doing anything wrong/posting wrong or have the wrong place, tag or flair or anything the like I apologize and please correct me!
Regarding my actual query:
I stumbled upon Leon on F-Droid specifically because I was so annoyed by the mess, that the official Android Reddit app (that everybody has to use now - thanks reddit for killing all 3rd party apps!) created when trying to share a post/links from it!
As an example, if you want to share any Reddit post or comment from the official android app, this is what the app does:
https://reddit.com/r/fossdroid/s/Wptky3Ma2I
And I noticed Leon doesn't know what to do with that, and cannot handle that weird shortened reddit link...
So, when you put that into a real browser then, this mess comes out of it:
https://www.reddit.com/r/fossdroid/comments/1659ic4/material_files_is_still_maintained/?share_id=Toc_TMpn88yOUd7Z-y0xv&utm_content=1&utm_medium=android_app&utm_name=androidcss&utm_source=share&utm_term=1
When you put that into Leon, it can handle it and turns it into:
https://www.reddit.com/r/fossdroid/comments/1659ic4/material_files_is_still_maintained/?share_id=Toc_TMpn88yOUd7Z-y0xv
But I feel like even then, the last part could theoretically still be stripped, no? Everything after "_maintained/" following the "?" in the URL could theoretically be deleted, or not?
So I guess my questions are:
1) Could Leon theoretically handle these weird shortened Reddit links, the official apps puts out? Or is that not all what Leon is intended for/I misunderstood everything?
2) When you have the long browser reddit link, can the last bit after the "?" in the URL, as shown above, also be stripped? Or am I just doing something wrong?
I also tried to attach two screenshots from Leon below in case that helps...
And once again, if I am not correct, don't understand well enough, labeled or did something wrong, then I apologize and please correct me!
Thank you so so much already! Sorry, and all the best!
(P.s. May I maybe ask, what the two toggles "Decode URL" and "Extract only URL" are for? Should I have turned on either, in order to process the mentioned short reddit link better? Or something like that?
I tried to find an explanation on the toggles, in order to not be the annoying person asking basic stuff, wasting time, but unfortunately I couldn't find anything... So just in case (very very optionally!) could someone maybe enlighten me, what these toggles do, even if it is really basic/dumb?)