Jump to content

Search Safari and Chrome Tabs [Updated Feb 8, 2014]


Recommended Posts

Search your tabs in Safari, Chrome, Chromium, Chrome Canary, and Webkit.

Screen%20Shot%202013-01-19%20at%2012.42.

When you action a result, it'll bring your browser to the front and switch to the selected tab. You can also close a tab by holding down alt when actioning a result.

Download from Packal

 

Updated Feb 8, 2014: Made it more resilient to an AppleScript error that could cause a blank output.

 

Update #2, Feb 1, 2014: Fixed regression with searching. You should be able to search anchored by words (and capital letters in CamelCase words) again.

 

Updated Feb 1, 2014: Rewrote the workflow. It now supports copying the URL of a tab, viewing a tab in QuickLook, and closing a tab with a modifier key.

 

Updated Oct 11, 2013: Fixed issue with improper string encoding in Mavericks and Ruby 2.0 breaking the workflow.

 

Updated Oct 9, 2013: Updated for Mavericks and Ruby 2.0.0. Removed thumbnails for now (beta versions of Safari don't seem to generate them anymore). Fixed some issues where the proper window wouldn't always focus correctly.

 

Updated May 4, 2013: Experimental support for webpage thumbnails. Prevent launching browsers when WebKit is open.

Updated Mar 26, 2013: (Hopefully) prevent launching browsers when it's not supposed to, and fix an issue with it not detecting WebKit.

Edited by Clinton Strong
Link to comment
  • 1 month later...

Updated. You can download it here or in my original post.

  • Fixed an issue with tabs not showing up for Safari.
  • Improved performance. You may still get some slowdown if you're running multiple browsers at the same time, but that'll be fixed in the next update.

I'm working on a rewrite to further improve performance and add a few new features. It's not quite ready yet, but I'll try to get it out soon.

Link to comment
  • 2 weeks later...
  • 2 weeks later...

Is there a way for this to not open Chrome when running the workflow? I mainly use Safari and only occasionally use Chrome, so have it closed most of the time. Or if that's not possible just a workflow to search Safari tabs, without Chrome :)

Link to comment

Is there a way for this to not open Chrome when running the workflow? I mainly use Safari and only occasionally use Chrome, so have it closed most of the time. Or if that's not possible just a workflow to search Safari tabs, without Chrome :)

 

Hm, it shouldn't be opening a browser if it isn't already running. It just looks for "Google Chrome.app" in the process list (`ps ax`), but maybe there's a background process running that it's picking up.

 

I tried making the search a bit more specific to make sure the browser itself is running, and not just a helper app. Let me know if that fixes it. (Updated download link in the original post.)

Link to comment
  • 1 month later...

Hm, it shouldn't be opening a browser if it isn't already running. It just looks for "Google Chrome.app" in the process list (`ps ax`), but maybe there's a background process running that it's picking up.

 

I tried making the search a bit more specific to make sure the browser itself is running, and not just a helper app. Let me know if that fixes it. (Updated download link in the original post.)

 

I think I stumbled upon a bug in your search script. If WebKit is open, every supported browser is opened when firing the script. I don't know Ruby too well, but it appears that the '||' [or] operand on line 69 is the culprit.

 

Works everywhere else! Thanks  :)

Link to comment

I think I stumbled upon a bug in your search script. If WebKit is open, every supported browser is opened when firing the script. I don't know Ruby too well, but it appears that the '||' [or] operand on line 69 is the culprit.

 

Works everywhere else! Thanks  :)

 

Thanks for pointing that out. Just published a new version (link in the original post), so let me know if you have any problems.

 

Oh, and I threw in webpage thumbnails for Safari users. It doesn't seem to work with pages served over SSL (HTTPS), but I tried to add in some placeholder images to help with that. It's still an experimental feature, so let me know if you have any feedback.

Edited by Clinton Strong
Link to comment

Thanks for pointing that out. Just published a new version (link in the original post), so let me know if you have any problems.

 

Oh, and I threw in webpage thumbnails for Safari users. It doesn't seem to work with pages served over SSL (HTTPS), but I tried to add in some placeholder images to help with that. It's still an experimental feature, so let me know if you have any feedback.

 

WebKit bug seems to be fixed (many thanks  :) ). I am not a huge fan of the previews; the icons look cleaner. Maybe it should be optional? At least until Alfred's feedback output system matures.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...