Tweet from Opera’s Address Bar
A few weeks ago my good friend Oleg Melnychuck thought it’d be awesome to have Twitter integration in Opera. I agree wholeheartedly, but I don’t think Opera would add it. I thought that sending a tweet using Opera’s custom search feature would work by right-clicking on the update form on my Twitter and going to “Create Search”. That will work as long as there’s an active auth session, so it’s not usable unless you’ve already logged in.
XMLHTTPRequest to send the
POST data. Well, that didn’t work because cross-site requests aren’t allowed. I was about to give up when it came to me to use an
object element is included using a
data URI so I could include the
data URI. It’s ugly, but it does work:
To use it follow these directions:
- Copy the long
dataURI into a text editor and do a text replacement for “ook” then replace it with your twitter username.
- Do a text replacement for “eek” and replace it with your password.
- Go to Tools → Preferences (or Opera → Preferences on Mac OS X).
- Click on the Search tab then click the Add… button.
- In the input box labeled Name type in
- Type in a suitable keyword in the
Keywordfield. I use
- Paste in the
dataURI from your text editor into the
Addressfield and click OK.
Now you should be able to type
tw Tweet! and update your status on Twitter with “Tweet!”. As this is just a proof-of-concept it can be expanded to do more such as display an error if you’ve typed in more than 140 characters among other things. I just thought I’d challenge myself to see if it could be done.