Tuesday, July 7, 2009

Bookmarklets (p4): iPhones & All

Once a week for the last three weeks, I talked about bookmarklets. In this series, I gave a bookmarklets introduction, how to best manage bookmarklets ensuring that they're organized, portable and accessible to you from anywhere, and finally last week we talked about the basics of writing bookmarklets. This week, I'm hoping to close the series with part 4 titled "Bookmarklets: iPhones & All."

What do you mean "iPhones & all," you may ask. Believe it or not, most people do not know that bookmarklets work on iPhones and on iTouches (iPod Touch). As a matter of a fact, I can't imagine owning an iPhone without some really essential bookmarklets. But we'll get to that here in a few.

As I've mentioned in other parts of this series, bookmarklets for the most part run on almost all browsers (especially good-written ones), which make them platform independent. In other words, as long as the browser supports JavaScript (and I don't know many that don't), it doesn't matter if you're running said browser on a Windows machine, Mac, Linux, or on any of the mobile platforms out there. Aside from that advantage alone, I run bookmarklets because I don't like to have toolbars. In addition to the valuable real estate that toolbars take up, more so on a laptop screen, I do not want the additional virus-and-the-like entry-points that toolbars create. I digress.

Since bookmarklets are JavaScript invoked within a browser on the current page, it is no surprise that writing them may encounter browser compatibility issues. For example, it may run well in Firefox (FF), but not so in Internet Explorer (IE). A JavaScript call (bookmarklet or not) may even run on IE8 but not so within IE6 (there's a shock, right?). For that reason alone, it's best to test the bookmarklets you obtain and make sure that they run on your desired browser & platform. In this case, you want to make sure that the bookmarklets you write and/or obtain will actually run on your iPhone's browser of choice.

Until very recently, within the last couple of weeks, iPhones didn't have the ability to copy & paste. And as I understood it, the new iPhone 3G fixed that issue. I'm not sure, however, that it fixed the need for a "find in this page" feature, for example. I know that folks love their iPhone apps; but their are things, I'm sure, you want integrated with your iPhone's browser (natively, it's Safari) without having to launch an app. That's where bookmarklets for your iPhone come in. Better yet, some bookmarklets (free of course) could replace an app you'd otherwise pay for with your hard earned money. In my humble opinion, I have a bookmarklet that allows me to tweet (post to Twitter) the current page I'm currently on while using bit.ly's URL shortener. Nothing against the iPhone app Twittelator Pro (cost $4.99, I believe), but I'd rather the bookmarklet. Granted, at this price, it's hard to ignore the so many features the app packs & provides; but I was going for the example here.

Unfortunately, the process to add a bookmarklet on your iPhone's Safari is very clunky. In short, you have to save that link as a bookmark, and then go back and edit that bookmark to delete everything before the javascript: part.

There are several step-by-step instructions on how to go about adding bookmarklets to your iPhone without syncing (or jailbreaking). Amongst them is this illustrated guide, and this unusual way of adding them by email. My favorite, however, is a bookmarklet by TheCSSNinja that helps you add bookmarklets to your iPhone. You may have to add this one bookmarklet first the traditional way described in the links above, but after that, you can use the bookmarklet to add all others.

Here's a well detailed video to help you out. I don't know much about the service, but I do like their instructions on how to add bookmarklets, which of course apply to all bookmarklets added to an iPhone or iTouch, and not just their own.


So now you're able to add bookmarklets to your iPhone and iTouch. What bookmarklets should you add? For that, I direct you to do a search like this one. I personally found this link and this one here very helpful too. Of course, I also post some right here on Ahmadism.com, and plan to do more of that in the future.  ▣

Click here to see other Tuesday posts (including the current one).

No comments: