Auto-completion gone wild.
From Adactio’s journal, about his feelings on hash-bang URLs.
Finally! Firefox’s had it for years, Google Chrome’s had it since its launch — even IE’s got colored syntax highlighting! Yet, Safari — being one of the most cutting-edge browsers out there otherwise — misses this easy yet important feature.
And here’s the beauty of this problem — Safari 5 supports extensions. Now, people can fill in the blanks and give Safari hundreds of new features. These user-contributed extensions has been Firefox’s biggest advantage over the years.
Everything is different now. In my opinion, the implementations found in Chrome and Firefox are inferior compared to Safari’s elegant way of handling both installation and management of extensions.
What’s BetterSource? It’s an extension that will show the (original) source code in colored syntax highlighting. The code will open in a new tab (instead of an own window like Safari normally does).
It will also display line numbers. Lastly, it’s possible to show the generated source1 — that is, the final end-product made by a combination of the rendering the browser itself is responsible for, as well as the original HTML sent from the server. And most importantly — DOM manipulations and other changes in the code made by JavaScript.
Generated source is what you see when you right (or control) click the current web page and choose “Inspect Element”. (Assuming you’ve activated the Developer menu — if not, you’ll find the option in Safari > Settings > Advanced). ↩
XAR is an “easily extensible archive format”. I didn’t know about XAR until recently. I discovered it when examining a Safari 5 extension.
I assumed Safari extensions were simple bundles — like apps or widgets. So, removing the file extension .safariextz would turn an extension into a simple OS X folder — at least, so I thought.
Turned out I was wrong. So, I typed the file command in the Terminal and found out it was some kind of archive format. So. That’s how I first got to know about XAR.
Anyway. XAR. Apple uses it (which automatically makes me interested in the technology at hand…) Why? Probably because it’s structured. The content is basically described by a simple XML file. (Or by a property list — plist — in Apple’s extension case.)
I think the idea behind Safari 5’s extension architecture is way less-geeky than Chrome’s equivalent. Also, it’s more beautifully executed. Now, onto next task: Coming up with an idea of a Safari extension.
Why You’ll Love to Develop with Apple Technologies