Jump to content

Recommended Posts

Like Safari Assistant, but for Firefox.

 

demo.gif

 

Download from GitHub.

 

  • Search Firefox bookmarks
  • Search Firefox browsing history
  • Run bookmarklets
  • Activate & close tabs
  • Add you own custom scripts

 

The workflow requires you to install a corresponding Firefox extension in order to communicate with Firefox.

 

After installing the workflow, run ffass > Install Firefox Extension to get the extension. Once the extension is installed, everything should just work.

 

extension-connected.png

 

The workflow is fairly customisable. You can add your own URL actions via scripts, set custom icons, and assign URL & tab actions and bookmarklets to alternate hotkeys.

 

See the documentation for details.

 

Edited by deanishe

Share this post


Link to post

When I run ffass > Install Firefox Extension I get an error message: “alfred-firefox” cannot be opened because the developer cannot be verified." and my options are to Move to Trash or Cancel. Suggestions?

Share this post


Link to post

Thanks! I don't have Developer Tools installed, but allowing individual workflows seems to have fixed the problem. It's great to finally see an Alfred workflow for Firefox! Much appreciated!

Share this post


Link to post
6 hours ago, kwehner57 said:

Anyway to configure it so bookmarks open in the current tab instead of opening in a new tab?

 

Not unless Firefox has a setting for that. You could add a script that pastes the URL into the current tab, but realistically, that would need to be added to the extension to work reliably.

Share this post


Link to post
16 hours ago, deanishe said:

 

I think I’ve commented this before, but I’m pretty sure the “right-click and pick Open” method also works for binaries. It’s way faster and more straightforward than having to tun off Gatekeeper and going into System Preferences, and it’s an official method.

Share this post


Link to post

On another note, I haven’t looked at the code but I don’t suppose your extension (or an extension) could bridge the gap with the missing AppleScript functionality to at least return the title and URL of the frontmost tab, could it?

Share this post


Link to post
1 hour ago, vitor said:

On another note, I haven’t looked at the code but I don’t suppose your extension (or an extension) could bridge the gap with the missing AppleScript functionality to at least return the title and URL of the frontmost tab, could it?

 

It's definitely technically possible. I thought about implementing a CLI client (say /usr/local/bin/firefox-cli) to encapsulate the interaction with Firefox, but that would have made installing the workflow more complicated, and that's ultimately what I wanted to build. I'll probably refactor the workflow to make the bits needed to communicate with the extension importable from other code. It's basically just an RPC server + client. As long as the extension and workflow are installed, other programs can communicate with Firefox, too.

 

As far as the general case goes, the native messaging API for extensions runs an external program or script and passes messages back and forth via STDIN/STDOUT. I added an RPC server, which is how the workflow talks to it, but you could add an HTTP server, too, which would allow just about anything to talk to the extension. I didn't do that because I wanted to use a UNIX socket (more secure), and RPC is simpler.

 

I've also been thinking about how other workflows could call into this one to get the frontmost-tab info. Perhaps like URL schemes on iOS, where you call an external trigger with the name of your own external trigger it should call with the info?

Edited by deanishe

Share this post


Link to post
On 1/11/2020 at 2:17 PM, vitor said:

I’m pretty sure the “right-click and pick Open” method also works for binaries

 

I've added that to the wiki, too. Thanks.

Share this post


Link to post

I apologize if I'm missing something super obvious... but how do you search for a tab and close it? I can only see how to close tabs to the left/right of the result tab.

Share this post


Link to post
4 hours ago, joeynotjoe said:

I can only see how to close tabs to the left/right of the result tab.

 

That's all there is. The workflow doesn't duplicate actions like "close tab", which already have keyboard shortcuts in Firefox.

Edited by deanishe

Share this post


Link to post

Hi,

 

Would it be possible to add a new command "nf" to open a new firefox window on the current desktop.

 

Each time when I need a new firefox window on another desktop I have to go to firefox (which switches to the last active firefox window) then CMD + N, and then move the window to the desktop where I want it.

 

It would be a great addition for me, since I frequently have to do this.

 

Thanks!

Share this post


Link to post
1 hour ago, Michael_K said:

Each time when I need a new firefox window on another desktop I have to go to firefox (which switches to the last active firefox window) then CMD + N, and then move the window to the desktop where I want it.


Right-click on the Firefox icon in the Dock and choose New Window. That’s a good bit faster. 

Share this post


Link to post
On 2/26/2020 at 10:43 AM, deanishe said:


Right-click on the Firefox icon in the Dock and choose New Window. That’s a good bit faster. 

 

Not really to be honest. It requires to take my hand of the keyboard, go with trackpad to side of screen (widescreen) wait for dock to show up (its hidden default) and then do right click etc.

 

CMD + Space + e.g. fn (firefox new) would be a lot faster.

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...