Teaching Alfred about the Helium Browser
I use a custom Alfred workflow called quote-capture to clip text and source URLs from web pages. Safari and Google Chrome work fine because the workflow uses Alfred’s built-in automation task, tabs-current.
Since I switched to Helium, the URL capture broke. I rely on the front browser current tab for a ton of other workflows as well. In this case, the selected quote was captured fine (via standard clipboard copy), but the source line stayed blank.
The “hidden” whitelist
Under the hood, Alfred’s tabs-current automation task determines the frontmost browser by calling get-frontmost-browser and matches it against two hardcoded lists:
- WebKit variants:
Safari,Webkit,Orion - Chromium variants:
Google Chrome,Chromium,Opera,Vivaldi,Brave Browser,Microsoft Edge,Arc
Because Helium is not in either list, Alfred’s helper task throws an “unsupported browser” error. The JXA wrapper catches the exception and returns an empty object.
- It’s 2026 and I am flummoxed that
Arcis still part of that list whileFirefox,ZenandHeliumare missing.
Designing a Resilient Fallback
Alfred folks are quite clear that they are not maintaining that list with any urgency. So, I updated quote_capture.sh to intercept the query when Helium is active.
The JXA script now checks the frontmost application process. If it is Helium, we query the browser directly instead of relying on Alfred’s helper:
function getHeliumTab() {
try {
const app = Application("Helium")
if (app.running() && app.windows.length > 0) {
// 1. Try Chromium-style JXA dictionary
const activeTab = app.windows[0].activeTab
const url = activeTab.url()
const title = activeTab.name() || activeTab.title() || ""
if (url) return { title, url }
}
} catch (e) {}
}
Pure Portability
By intercepting the frontmost application check and implementing a layered JXA, the workflow handles Helium while maintaining support for default whitelisted browsers.
More importantly, can easily extend this if a new browser hits the system.
The same thing can also be achieved via a workflow component as follows:
- add a conditional block after the “Current Front Browser Tab”
- detect an empty string and then run an osacript with the following command
on run argv
tell application "Helium"
set currentURL to URL of active tab of front window
return currentURL
end tell
end run
- and pass the output to the
Open URLaction
For a brief moment there I was wondering if I had to move back to Chrome / Safari and this solves the pain point.