Greasepocket: Bridging the Browser to the Client

The iPhone knows my location, but it doesn’t let me share it with websites via the built-in browser. For an application developer to auto-magically provide me location-aware benefits they need to write a client app. Greasepocket is a version of Greasemonkey for the iPhone. Just like Greasemonkey userscripts can be installed via the web. These scripts can access the accelerometer and location APIs (perhaps more). Greasepocket has the potential to shift some of the balance back to the web.

I’ve included a demo video and an explanation of what you are seeing below:

In the first half of the video, a GreasePocket script is used to insert “Hello World” into the query box for Google Mobile. In the second half of the video, a GreasePocket script is used to add a “Signature” button to GMail. The “Signature” button adds “Sent from my iPhone” to the end of an email, along with the Google Maps link to the user’s current location. If you have trouble viewing the video, a high resolution (15 MB) QuickTime version is here.

A PDF of the presentation can be downloaded.

The Greasepocket was built this past weekend at the iPhoneDevCamp by Ishan Anand and Ajay Kapurand of Next Mobile Web. It will be open-sourced and they are looking for help.

Who knows if it will actually be allowed into the App Store. If it isn’t I will consider hacking my iPhone again. Of course Apple could just provide all of this same API access via the browser and we wouldn’t need Greasepocket to share our location (though obviously we’d still need to put a signature button on the GMail screen).

(via Dion on Ajaxian)

tags: ,
  • http://www.5o9inc.com Peter Cranstone

    >> The iPhone knows my location, but it doesn’t let me share it with websites via the built-in browser.

  • http://www.niallkennedy.com/ Niall Kennedy

    Nokia only just added JavaScript APIs to Web Run-Time three months ago, so there may be some hope for Apple catching up now that iPhone OS 2.0 is out the door. There are many features of iPhone OS in testing for version 2.1 and beyond wrapping up some things that didn’t quite make it into 2.0. It’s much more interesting to reach the 99% of iPhone owners who don’t jailbreak and take full advantage of what’s already there in 2.x.

  • http://www.tralfamadore.com/ Wes Biggs

    For location-sharing on the iPhone you might also want to check out Locatable (see http://lbs.tralfamadore.com). It uses a simple redirect approach to enable any web site to receive location info (subject to user permission).