Share this post

Link to post

Not too long ago I switched to using Opera as my everyday browser. I really like it (Chromium + native ad blocking + better looking), but missed all the Alfred workflows that get the current URL.

I've already been doing some GUI scripting for other reasons, so the last time by muscle memory I tried to use a "current url" workflow in Opera, I decided to see how hard it would be. Turns out, not hard at all—here's what I added to the script to make it work for Opera:

Note: The whole url needs to be showing in the address bar, since that's where this gets it from. So make sure Settings > Browser > "Show full URL in combined search and address bar" is checked. Otherwise, for example, "https://www.google.com/" would just return "www.google.com". Also, Alfred needs to have Accessibility access, but if you're reading this, it most likely already does. ?

Hope it helps someone!

Edited September 21, 2017 by derBinglefix code indentation

Share this post

Link to post

@derBingle That method seems fine, but I won’t add it to the list because it’s a bit hackish. For it to be added to the gist, it needs to be part of the app’s AppleScript dictionary and have both URL and page title support.

Share this post

Link to post

@derBingle That method seems fine, but I won’t add it to the list because it’s a bit hackish. For it to be added to the gist, it needs to be part of the app’s AppleScript dictionary and have both URL and page title support.

Understood. ?? I didn't figure you would add it to the gist—it's most definitely an (unavoidable) hack and also subject to change with any changes to Opera. Mainly just sharing for any other Opera switchers like me who want to get back the functionality in their workflows.