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.
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)