Lion wearing a viking helmet (logo for Velja)

Velja is More Than a Browser Picker

Lion wearing a viking helmet (logo for Velja)
Velja

On a recent episode of the Mac Geek Gab, listener John sent in a suggestion to try an app called Velja from open source developer Sindre Sorhus, which was described as a browser picker. I decided to go check it out and I am pleased to say that this free app solves some real problems. Let’s walk through the problems to be solved first and then I’ll describe how Velja solves them.

Many web services are now designed to require you to use a Chromium browser such as Microsoft Edge, Opera, or Google Chrome. This concerns me a great deal, having lived in the bad old days when web services required ActiveX. ActiveX was a proprietary capability only available in Internet Explorer on Windows leaving Mac users out in the cold. I don’t like the trend even though Chromium browsers run on the Mac. But that’s the world we’re in now.

If your default browser is not a Chromium browser, you’re going to have problems when you try to access one of these services. If you like Safari or DuckDuckGo, which are both Webkit browsers these services won’t let you in. Likewise, if you use Quantum-based Firefox, you’ll be denied access and told to use a Chromium browser instead. Many of these sites say you have to use Google Chrome but that’s misleading or at the least an oversimplification because you can definitely use Chromium browsers such as Edge or Opera.

Steve and I are using StreamYard to broadcast the live show, and every single week I click on the StreamYard link Steven sends me, it opens in Safari, tells me it won’t work, and then I painstakingly copy the link, open a compatible browser, and paste in the link. I hate wasting time like this. There may be those of you who do remember before clicking, but you still have to copy the URL, open the alternate browser and then paste it in.

Velja fixes this problem.

Zoom Links Open in Safari Asking Permission to Open in Zoom
Zoom Links Open in Safari Asking Permission to Open in Zoom

Here’s another one. You get an invite to a Zoom meeting and you click the link. It opens your web browser, but it immediately says, “Can I open this in the desktop app?” What if it could open the desktop app directly from the link? Wouldn’t that be swell?

Velja can fix that.

I’m betting there are privacy-minded folks here who want to use DuckDuckGo for everything, but they find it doesn’t work for everything they do. What if you could flip browsers on the fly?

Velja will let you do this too.

Velja as Your Default Browser

Ok, let’s get into how Velja performs this magic. Velja installs as a menu bar app and as a browser extension. When you run Velja for the first time, it will request that you allow it to be your default browser.

My instinct was to say no because I want Safari to be my default. But as I learned how Velja does its job, I realized that it’s like a traffic cop whose job is to direct links to different browsers. It needs to be the default browser in order to direct that traffic.

Velja Preferences Are the Power

Once installed, it’s time to jump into Velja’s preferences to get to the real power of the app. Velja installs as a menu bar app so you have quick access to its preferences.

Predefined Apps

Prepopulated Apps in Velja
Prepopulated Apps in Velja

If we jump to the Apps tab in preferences you’ll see a pre-populated list of common tools that have dedicated desktop web apps. Next to each name is a dropdown allowing you to choose your local desktop version or direct it to open in a web browser of your choosing. I scrolled to the bottom and saw Zoom in the list and set it to open Zoom links in the Zoom.us app.

I raced over to Calendar and clicked the link in the standing event I have to record with Bart and squealed like a little girl with delight when the Zoom app opened instead of Safari.

The full list of tools in the pre-populated list includes: ClickUp, Discord, Figma, Google Meet, Jitsi Meet, Linear, Miro, Notion, Spotify, Telegram, Trello®, Twitter, YouTube, Zeplin, and Zoom.

Let’s say you like Chrome, but you don’t want Google knowing what you watch on YouTube — a rather contrived example, but work with me here. You can set YouTube to open in DuckDuckGo while your default browser is Chrome.

Some apps from the Mac App Store require a little bit of attention when assigned to open certain links. I tested setting Twitter links to open in my favorite app Tweetbot and got this message in a popup:

“The app “Tweetbot” does not declare support for URLs. Velja cannot directly open URLs with this app because of App Store restrictions. To support this, you need to copy the file “open.sh” into the “/Library/Application Scripts/com.sindresorhus.Velja” folder. Both of these will be shown to you. Even with this, there is no guarantee the target app can actually handle URLs.

Tweetbot from Mac App Store Warning
Tweetbot from Mac App Store Warning

That sounds super scary but when I clicked OK, Velja automatically opened two folders and I got another popup telling me to copy a tiny, one line script file from one folder to the other. Sindre was nice enough to explain that drag and drop doesn’t copy, so to be sure to actually copy-paste. It’s an odd thing to have to do, but it certainly was not difficult.

Now all of the Twitter links David Roth sends me about the imminent demise of Twitter will open in Tweetbot instead of the web.

NERD ALERT: For the nerds amongst us, inside the package for Velja he’s got a Script folder and a bash script called open.sh that says open "$@". The bash script then gets copied to /Library/Application Scripts/com.sindresorhus.Velja

Rules

The next coolest (or maybe coolest) capability in Velja is controlled in the Rules tab. Here you can tell Velja what kinds of links should open in which browser (or app). As a reminder, my main problem to be solved is that StreamYard will only run under a Chromium browser. I’m weary of copying and pasting the URLs like an animal, so let’s see if I can use Velja to open all StreamYard links in Microsoft Edge.

To create a new rule, you drop in a sample URL and then tell it what to look for. By default, it will suggest that it look into your URL and find just the domain within that URL. If it’s successful, it will show you the match it found with a happy green checkmark. Tap save and you’re done.

StreamYard Rule in Velja
StreamYard Rule in Velja

I built my little rule to find all StreamYard links and then went to Telegram where Steve sent me last week’s invite. When I clicked on the link, it gloriously opened in Edge. Huzzah!

If for some reason matching by domain doesn’t work, you can also ask Velja to search by domain and subdomain, URL Prefix, URL Contains, or you can build your own Regular Expression if you’re Allister Jenks.

You can create rules that cause all links clicked from within a specific source app to be opened in a specific browser. As a test, I created a rule that causes all links clicked inside Slack to be opened in DuckDuckGo and it worked. I am not a Microsoft Teams user, but I know that it gives you quick access to your team’s Sharepoint files, and maybe it would work best if they were always opened in Edge even though your default browser is Firefox.

Velja runs each rule in order, so if you have multiple rules that deal with a related task, you can reorder them to make sure they function properly.

Remove Tracking Parameters

You know how you sometimes find something that looks interesting to share, and you copy the link but the URL ends up being some giant glop of text? That giant glop is filled with tracking parameters. If you share it, not only does it look really annoying, you’re providing even more information to those who are trying to track you on the Internet.

When I encounter this problem, I usually strip off everything from the question mark to the end of the URL. The question mark is what starts the query string where all of the tracking parameters go. This method isn’t foolproof though, because sometimes the query string contains important information.

That query string can include key/value pairs that identify the exact thing you’re trying to show. Let’s say you have a link to a dress you like. The link might include size=large, and color=blue. If you sent the URL without those terms, the person wouldn’t know which dress you wanted for your birthday.

It’s a tedious process at best to remove the tracking parameters when sending links and at worst, you could miss critical parts of the URL.

In Velja on the Extras tab in preferences, you have two checkboxes that you might like to engage. The first instructs Velja to remove tracking parameters when you open links from others (yay) and the second removes tracking parameters when copying links to send elsewhere.

I did a little testing and for the most part, it worked. I did find that TikTok URLs weren’t stripped properly. I sent a note to Sindre and he explained that TikTok changes the way they do it so he has to keep updating his algorithm. I hope that game of whack-a-mole won’t get too exhausting for him.

Browsers Tab

Browser Options in Preferences
Browser Options in Preferences

In the Browsers tab of Velja, you select your primary and secondary browser. This is an unusual option so let me explain how it works.

Let’s say I have Safari as my default browser and Opera as my secondary browser. If I simply click a link it will open in Safari, but if I hold down the function key when I click, it will automatically open in Opera.

On the same Browser tab, you also define which browsers are shown in the dropdown from the Velja menu bar app.

If you use different profiles in your Chromium browsers, like say one for work and one for home, you can grant access to Velja to show your different profiles as though they are separate browsers options.

The Menu Bar App

Velja Menu Bar App Dropdown
Velja Menu Bar App Dropdown

Now that you have everything automated to your heart’s delight with preferences for Velja, there’s some interesting and I would say delightful interaction you can have with your browsers.

If you open the menu bar app for Velja, you’ll see a dropdown containing a list of the browsers you specified in preferences (including your browser profiles). From here you can change your default browser on the fly. You can also choose an option called Prompt.

With Prompt selected, when you click a link, you’ll see a very pretty popup with the icons for your available browsers. Tap on the one you want (or type the number under it) and your link will open in that selected browser. I know the interactive prompt sounds like extra work and it definitely is, but there’s something very pleasing about the interface that I enjoy. If you like to control your browsing experience at all times, I think you’ll like the interactive prompt.

One important note is that any rules you have defined overrule the choice you make from the interactive prompt. In my example where I’ve created a rule that says all StreamYard links should open in Edge, if I later try to open a StreamYard link in DuckDuckGo it will still open in Edge. I think that’s a good design.

Browser Extension

Velja has browser extensions for Safari and Chromium-based browsers. The extension doesn’t do a lot but it could be handy. Let’s say you’re on a site in Chrome in your home profile and you realize you need to be in your work profile. If you click on the extension in the toolbar, you’ll get the delightful interactive prompt, allowing you to select the alternate profile to open the link. Obviously, you could do this to change browsers entirely as well.

Tips

I’ve given you a really good start on how to use Velja but Sindre has even more tips on usage on the Velja page of his website. There are more keystroke options, you can download a mini-app that allows you to add a private Safari browser option to your list, and more.

I didn’t check 100% of Velja’s capability with VoiceOver, but everything I tested was accessible so that’s awesome.

Why is This Free?

One question many of you may have is why this wonderful app free. Sindre Sorhus is a prolific open source developer whose work is entirely sustained by donations from the user community.

When I say prolific in open source, I mean it. He actively maintains more than 1000 npm packages (think of them as mini apps). His libraries are in many of the mainstream packages on which we all depend.

In addition to writing packages, he has 31 apps for macOS listed on his home page. I’m used to open source projects looking like the Windows 3.1 interface, but all of Sindre’s apps look gorgeous including the icons!

Wish you had the Touch Bar back? He’s got a simulator. Want to keep your Mac from sleeping? He’s got you covered with Lungo. Want to hide sensitive parts of an image? Black Out might be what you want. Wish you were faster at finding the best animated GIFs? Try Jiffy (with a J). Ever wish there were more options in the Share Menu? Shareful might add the options you need. Wish you could have any text of your choosing in the iOS Lock Screen widgets? Any Text will be your friend.

I may never get any more work done this week because I can’t stop downloading and playing with Sindre’s vast library of free apps for macOS and iOS.

Check out all of Sindre’s tools at sindresorhus.com/… and enjoy a better browsing experience with Velja.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top