Posts Tagged: safari

Mongo Monitoring Via Mongo Live In Safari 5

We’ve recently started integrating MongoDB more extensively into our systems at work and found ourselves wanting some basic monitoring during dev to see what the DB was doing. A friend suggested Mongo Live, which fit the bill but was only compatible with Chrome. Since I switch frequently between Safari and Chrome I decided to port it.

Fortunately the extension for Chrome required only minimal changes to get it working in Safari. The most significant change is that the Safari extension uses a toolbar button to activate. The fork is available on Github and supports Chrome and Safari. Hopefully someone finds it helpful!

Localizing Safari 5 Extensions

Update: If you’re a registered developer you can check this thread for more information. The gist is that settings strings are not localizable at this time. I’ve filed a bug 8105949 against it (I recommend everyone report one as well if they want this fixed).

I’ve gotten a great deal of requests to localize my Safari extensions into various languages. Unfortunately, Apple hasn’t released any documentation on whether or not the Info.plist data can be localized.

In normal Mac OS X applications you can define key/value pairs using a Language.lproj directory with an InfoPlist.strings file. OS X then automatically uses the translated strings based on the primary language. As this seemed a likely candidate for i18n support, I’ve been experimenting with this for the past day or two…without success. So now I’m pleading with you, the internet! Is there a way to do i18n in extensions? Or will we need to wait for Safari 5.x to add this (critical) feature?

Tab Duplicator, A Safari 5 Extension


View All My Safari Extensions

Tab Duplicator adds a contextual menu item as well as a toolbar icon1 that will duplicate your active tab. By default it creates a new tab in the background, but it can be configured to make them foreground as well. You can also select tab positioning (first, last, before active tab, after active tab).

To install:

  • Download the signed extension and double click to install2
  • Right click and choose “Duplicate Tab”.

You can view the source on GitHub as well! If you have suggestions for improvements let me know! Bug reports should be directed to the issues page.

Changes in 1.2

  • Added toolbar icon in addition to contextual menu. If you don’t want it you can hold command and click and drag it off to remove.
  • You can now choose where to position your duplicated tabs. Choices are after current tab (default), before current tab, beginning, or end.
  • Optimized code. No more injected script.
  • Validation of events (disables button/contextual menu item if no URL is loaded)

Thanks to Brian Kim for the icon!

  1. You can hold command and drag the toolbar item off the toolbar if you don’t want to use it!
  2. If you haven’t enabled extensions in Safari then learn how.

Enabling Extensions In Safari 5

View All My Safari Extensions

People keep asking me how to install extensions in Safari 5, so here’s a quick visual primer.

Open Safari’s preferences, click the advanced tab at the top, and check “Show Develop menu in menu bar”.

Now click the Develop menu in the menu bar and select “Enable Extensions”.

Extensions are now enabled! Double click your extension to add it, and then you can control them in the Safari prefs under the Extensions tab.

Google Lightboxer, A Safari 5 Extension

7/20/2010 Update – Google has released a significant images update that breaks lightboxer. I’ll look into this and fix it within the next week or so.


View All My Safari Extensions

Google Lightboxer1 is a Safari 5 extension that creates a Lightbox2 slideshow on Google Images. Click any image and a slideshow will appear loading the full resolution images. If you don’t want to have the lightbox appear, hold command and it will be disabled temporarily.

To install:

Latest Release – v1.3

  • Pulls the Google Images metadata into the colorbox so you can see it while you’re browsing more easily.

Known issues:

  • Some JS errors in console. Will be resolved in future release, but they are cosmetic only.

You can view the source on GitHub as well! If you have suggestions for improvements let me know! Bug reports should be directed to the issues page.

  1. Icon courtesy of Brian Kim.
  2. Actually it’s done using Colorbox
  3. If you haven’t enabled extensions in Safari then learn how.

ctrlSwitcher, A Safari 5 Extension


View All My Safari Extensions

On the Ars Technica forums someone mentioned that they’d like to be able to switch between tabs using command + numbers to choose tabs. I took a look at the Safari extension system, and while you can’t override the shortcuts bound to cmd 1-91 for some reason, control is available. An hour or so later and ctrlSwitcher was born.

Features

  • Use a modifier (ctrl by default) + the number keys to instantly jump to a tab. Keys 1 through 0 will go to tabs 1-10, and keys q through p will go to tabs 11-19.
  • Configurable modifier key
  • Configurable “go to last tab” key

Download and Use

  • Download the signed extension and double click to install
  • Pick if you want to use ctrl, opt, or ctrl+opt as your meta keys (default ctrl) in the prefs
  • Now close all tabs or restart your browser. ctrlSwitcher has to load a small script in each loaded tab (empty tabs cannot be switched to/from due to limitations on extensions)
  • Note for Windows users: You will need to switch your default modifier key from ctrl to alt or ctrl+alt to have this tool work.

v1.6:

  • Adds cmd+opt as a choice for key combo (see the commit)

You can view the source on GitHub as well! If you have suggestions for improvements let me know! Bug reports should be directed to the issues page.

  1. cmd-1 through 9 are assigned to bookmarks on your bookmarks bar in Safari