MiddleClickClose Updated For Future Safari Versions

08/31/2009 Update: For Snow Leopard compatibility, see here.

Yesterday Apple release Safari 4.0.3 which, of course, broke MiddleClickClose. Again. The problem lies in the file Info.plist that is part of the plugin. From what I read about SIMBL, good practices said that you should include a key called MaxBundleVersion whose value was the internal version number of the app you were patching. The problem is that every time Safari gets updated, Apple increments that number and SIMBL won’t load the extension any more, since it proclaims that the maximum version of Safari it should be loaded with is the previous version.

I usually play catch-up with Apple and get MiddleClickClose updated a day or two after a new Safari ships. I’ve decided to stop that and have removed the MaxBundleVersion from the Info.plist. This is, after all, a dirty hack, so why not make it even hackier?

If you re-download and re-install, you shouldn’t ever need to update it again. If you already have it installed, you can just edit the Info.plist file that will be in ~/Library/Application Support/SIMBL/Plugins/MiddleClickClose.bundle/Contents, removing the two lines that look like this

<key>MaxBundleVersion</key>
<string>5530.18</string>

Here are the new downloads

11 thoughts on “MiddleClickClose Updated For Future Safari Versions

  1. Pingback: Middle Click Close For Safari | Joey Gibson's Blog

  2. Thanks Joey, it’s working again! However, everytime I start Safari it shows me this:

    “Safari 4.0.3 (v5531.9) has not been tested with the plugin MiddleClickClose (null) (v1.0). As a precaution, it has not been loaded. Please contact the plugin developer (not the SIMBL author) for further information.”

    Is it a way around it, or this is how it works? Thanks again for your good work!

    • Christopher, if you’re seeing that error dialog, then the plugin is not getting loaded. If you’re able to close tabs with a middle click, is there any chance you have it installed twice? Once with the correct Info.plist, and once with the old one? I can’t think of anything else.

  3. It is!! I didn’t know I accidentally installed another Simbl in my user folder, usually I just have one at the root folder. Thanks for your input, it’s working perfectly now! Appreciate it.

  4. Hi Joey, I tried placing the file in both *user*/Library/Application Support/SIMBL/Plugin and also in Macintosh HD/Library/Application Support/SIMBL/Plugin to no avail.
    I’m using Safari 4.0.3. Any ideas why

  5. Nope, no luck 😦

    Tried it with the ‘s’ for the Plugins.

    This might be the cause of it: the first time I tried installing it, I recall creating the SIMBL/Plugins folders. But when I tried to trace back, the SIMBL folder as well as the Plugins folder was gone. How many Library is there? As far as I know, there is only two. It’s highly impossible that I’ve created the folder in a wrong directory.

  6. To elaborate further, I understand we would only need to create the SIMBL and Plugins folder. The Application Support folder is already there, so there would only be 2 Library with the Application Support folder and when I created the SIMBL and Plugin folder for the first time (as said above), it was in either one of the Library.
    Sorry if none of this makes any sense :S
    Cheers

  7. Hi, this doesn’t seem to work with Snow Leopard (ie. safari in 64-bit mode). Are there plans to make it work with the latest OS?

    I love this plugin. Thanks!

  8. That’s an interesting question, Eugene. The plugin uses an InputManager called SIMBL to do its work. Without SIMBL, MiddleClickClose couldn’t work. There has been word/rumor for a long time that Apple was going to disallow InputManagers. First, they were supposed to disable them in Leopard, but they didn’t. I recently heard the same thing for Snow Leopard. I did get my copy of Snow Leopard on Friday, but I haven’t installed it yet. I should be able to do that this week, maybe even today. Until then, I won’t have any idea if it will (ever) work on Snow Leopard or not.

Comments are closed.