betterbrowser / arcfox

Make firefox flow like arc
https://arcfox.vercel.app
MIT License
1.03k stars 33 forks source link

fixing url query #24

Closed Vincent-vst closed 1 year ago

Vincent-vst commented 1 year ago

Why this pr ?

I had a problem when I typed for instance "discord.com/app" (which is valid url) but I wasn't redirected to it (because it didn't start with http), so it just started to google "discord.com/app" which is not what I wanted. In this commits :

Quoting from the doc :

I had to append http to urls that doesn't contain it because firefox extension is not super friendly with "valid urls".

Fully-qualified URLs must include a scheme (for example, 'http://www.google.com' not 'www.google.com').

For security reasons, in Firefox, this may not be a privileged URL. So passing any of the following URLs will fail:

    chrome: URLs
    javascript: URLs
    data: URLs
    file: URLs (i.e., files on the filesystem. However, to use a file packaged inside the extension, see below)

Other info

Something that I need to mention is that a query that doesn't start with http* is redirected to http not https. For instance : if I type www.google.com arcfox will send me to http://www.google.com and then the google server will redirect me to https://www.google.com The reason behind this is that I cannot know in advance if the website is in http or https. More info on this stackoverflow post I made : https://stackoverflow.com/questions/76120582/javascript-convert-hostname-url-into-full-url

LuanderFarias commented 1 year ago

TYSM VINCENT!! You always helping with the project and damn your features are nice. tysm for the PR. for some reason your not appering on the contributors tab... do you know what it could be?

Vincent-vst commented 1 year ago

no problem ! I think I messed up my git config which is why I'm not appearing on the contributor tab.

LuanderFarias commented 1 year ago

@Vincent-vst that's bad :( would love to see your profile on contributors...