Blog on chrispederick.com

Why Web Developer May Finally Be Coming To Safari

When Safari 5 was released a year ago Apple followed the lead of Firefox and Chrome and added support for extensions. A number of people contacted me at the time asking if I would port Web Developer to Safari and I said I would look into the possibility.

When I looked at the Safari extension API it was clearly based on the Chrome extension API and I was initially hopeful that creating a Safari version of Web Developer would not only be possible, but relatively straightforward.

Why Web Developer Does Not Work With Safari (Yet)

My first thought was to add a toolbar button that could open an HTML version of the Web Developer toolbar just like I do in Chrome:

Web Developer for Google Chrome

However, while Safari supports adding custom toolbar buttons they can only execute JavaScript and cannot open HTML popups like Chrome allows. This did not appear to be an issue since Safari extensions are allowed to create entire toolbars—something that Chrome extensions cannot do—and this would be the ideal implementation for Web Developer.

As I started to work on creating Web Developer as a Safari toolbar though, a major shortcoming became clear. Safari toolbars can only contain HTML elements and do not allow those elements to expand outside of the toolbar—expanding menus in the toolbar are not possible.

The only way to work around this limitation is to use HTML select elements—an option that extensions like Safari Developer are using:

Safari Developer toolbar

I personally see this as a clunky solution with major limitations and poor usability. Therefore I decided to wait and hope that the Safari extension API matured to allow a better implementation of Web Developer.

Why Web Developer May Work With Safari In Lion

Cut to this week and Apple released a bunch of new information about the next release of OS X called Lion. Tucked at the end of their section detailing the new features in Safari in Lion is the following paragraph:

Safari extensions

If I am understanding this correctly it sounds like the Safari extension API will be updated to support HTML popups being opened by custom toolbar buttons just like in Chrome. If this is true then I will once again look into porting Web Developer to Safari.

When?

OS X Lion does not have a firm release date yet, but it is due to be released some time in July and I am currently working on the next release of Web Developer for Firefox. Any development on a Safari version would have to wait until the Firefox update is complete, but I cannot give any estimate as to when this might happen. Just know that I will be investigating the possibility of porting Web Developer to Safari as soon as I have the time once Lion is released.

Firefox 4

At the end of January I released new versions of both the Web Developer and User Agent Switcher extensions. These patch releases primarily added support for the then upcoming release of Firefox 4 which eventually came out two months later. Since then I have been extremely busy at work and have not had much time to work on the extensions, but I wanted to give an update about some issues that were found with Firefox 4.

Web Developer

The main issue with the Web Developer extension in Firefox 4 is that the toolbar menus are not checked when they are activated on Mac OS X. This is actually an issue with Firefox 4 and I have filed a bug with Mozilla that they have acknowledged, but are still working on. Hopefully this will be fixed soon as it’s a major issue that affects all toolbar menus in the browser.

There are also a few features in the Web Developer extension itself that have issues in Firefox 4:

  • The toolbar display options always reset.
  • The ‘Mark All Links Unvisited/Visited’ features no longer work.
  • Wildcard cookies can no longer be added.

I’ll be looking to fix all of these issues in the next release of the Web Developer extension.

User Agent Switcher

The User Agent Switcher extension also has a couple of issues in Firefox 4. First of all, the extension is not easy to access in Firefox 4 on Windows. There are currently a couple of ways around this as explained in the screencast below and I’ll be looking to fix this in the next release.

The second issue is that Mozilla removed the ability to override some of the user agent properties in Firefox 4 that you could override in previous versions. Specifically the app code name and vendor and vendor sub properties can no longer be overridden. There is nothing I can do to workaround this, but I will be updating the User Agent Switcher extension to indicate that those properties have no effect in Firefox 4.

Timeline

As always I cannot give estimates for when the extensions will be updated as it depends on how busy I am at work, but I am actively working on them whenever I have free time and will release them as soon as I can.

Web Developer 1.1.9 and User Agent Switcher 0.7.3

Patch releases of both the Web Developer and User Agent Switcher extensions have been released for Firefox. These releases primarily add support for Firefox 4 to both extensions as well as fixing a few issues in Web Developer including ‘View Style Information’ being vulnerable to a cross site scripting attack. The full list of changes to the Web Developer extension can be found in the release notes.

Web Developer 1.2

I had originally hoped to release version 1.2 of the Web Developer extension in time for Firefox 4. Version 1.2 will merge the Firefox and Chrome codebases of the extension, as well as adding new features and fixing a number of issues. However, this is still in development which is why I have released this minor update to make sure that Web Developer is at least compatible with Firefox 4.

I’m continuing to work on version 1.2 so look for progress updates on Twitter and Dribbble.

Web Developer 0.1 for Google Chrome

I am pleased to announce the release of Web Developer 0.1 for Google Chrome. The extension is available for download on the Google Chrome extension gallery.

Web Developer for Google Chrome

As the version number suggests this is an early stage build of the extension for Chrome that I wanted to release quickly to elicit feedback.

As such, there are a few missing features from the Web Developer extension for Firefox, particularly those that require custom interface elements like ‘Edit CSS’ as these need to be rewritten to integrate fully into the browser. Some of the more complicated features as well as configuration options like keyboard shortcuts are also not included in this initial release, but these will be coming soon in future updates.

One feature that unfortunately is missing is ‘Disable JavaScript’ as this is not possible to implement with the current Google Chrome APIs. Please star this bug and hopefully the APIs will be updated.

I haven’t had a chance to upload the source for the extension yet, but I should have something up (most likely on GitHub) soon and will post a link to the repository when I do. Please post any issues or feedback in the Chrome section of the forums.

A Sneak Peek At What I’m Currently Working On

Web Developer for Google Chrome.

A sneak peek at what I'm currently working on