excalith / excalith-start-page

Terminal-inspired, clean, feature-rich and customizable browser start page for geeks. Has built-in editor for customizing.
https://excalith-start-page.vercel.app
MIT License
554 stars 163 forks source link

Update RunCommand open url to only prepend 'https://' if it's missing #46

Closed redxtech closed 9 months ago

redxtech commented 9 months ago

Description of the Change

I have modified the openLink section of the RunCommand function to only prepend 'https://' to the URL if it doesn't already include it.

I was finding that I was unable to paste in a URL and go to it, because it would take me to https://https://github.com, which doesn't work. This uses regex to detect if the URL matches ^https?:\/\/, and if so, don't prepend 'https://'.

This should resolve #45.

Possible Drawbacks

vercel[bot] commented 9 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
start-page ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2023 7:04pm
excalith commented 9 months ago

@redxtech thanks mate! This resolves the #45 Accepting PR now, cheers!