Log in to Twitter quicker – a greasemonkey script

Update 16/01/11: Helpful commenter Ewerton points out you can just hit the tab key to bring up the login prompt. So the below now saves you a grand total on 1 key press! Probably not worth it Log in to Twitter quicker – a greasemonkey script

I find myself clicking on this a lot:

Log in to Twitter quicker – a greasemonkey script

It brings up this little box from which you can log in to twitter:

Log in to Twitter quicker – a greasemonkey script

In fact, it's rare that I don't want to click on "Sign in". So wouldn't it be great if that log in box was already there and that the cursor was in the username box ready to be typed in.

I've written a greasemonkey script to do just that! It works in firefox with greasemonkey installed and in Chrome. Here it is:

Twitter login greasemonkey script. (clicking the link won't do anything interesting unless you're using Chrome or have greasemonkey installed in firefox)

If you're interested to know the technical details keep reading.

When you click on the sign in button three things happen:

  • The sign in link gets the menu-open class added which changes it's appearance
  • The login box (signin_menu div) loses the offscreen class. The offscreen class positions the div -9999px from the left!
  • The username field gains focus

All the greasemonkey script does is recreate the behaviour when the page loads.

Check out my greasemonkey script for making TfL's Journey planner much easier to use.

Ewerton

Tags: , , ,

  • http://neilfein.livejournal.com/ Neil

    The script works well, and I just installed it on my CR-48 (chrome laptop); it works fine here as well.

  • http://blog.stevemould.com Steve Mould

    Show off! I’m quite jealous of your CR-48. Did you write an essay to get it? Good to know the script works in chrome OS.

  • http://neilfein.livejournal.com/ neilfein

    No, I think I just typed in the kind of work I do and left it at that. My father-in-law spent oven an hour filling out the application and he hasn’t gotten one. If you have any greasemonkey scripts you want to test on the chromebook, let me know. magnificentnose.com/contact/

  • http://neilfein.livejournal.com/ neilfein

    Oh, and please keep blogging; I’ve been enjoying your site quite a bit!

  • http://blog.stevemould.com Steve Mould

    Thanks Neil, I will.

  • http://blog.stevemould.com Steve Mould

    Thanks! Means a lot to get feedback.

  • Ewerton

    Not complaining about your work, but you can just press “tab” and it will show up!
    Nice blog, btw.

  • http://blog.stevemould.com Steve Mould

    Oh wow! I feel like an idiot. Thanks for the tip. Well I sort of had fun coding it so not a total waste of time.

  • http://blog.stevemould.com/journey-planner-instant-search/ A tool I made for Londoners that makes journey planning quicker | SHIFT_beep

    [...] Also have a look at my greasemonkey script that makes logging into twitter a little bit quicker. [...]

  • Ewerton

    haha yeah, coding for fun is never a waste of time :)

  • http://twitter.com/subcide Steve Dennis

    Twitter’s home page has now been redesigned and this is no longer necessary :) Progress!