Thomas Stig Jacobsen’s constant why

Programming, Internet security and ballroom dance

About

I'm a boy/man blogging on Computers, Security, Internet, Coding and common thoughts...

So after a not of attention after my first release of the Twitter Add-on for Google Chrome I decided to rewrite the whole thing today.

This has resulted in some dramatic changes and improvements. But I’ve also got some things I would like to investigate further to improve the extension further.

Why doesn’t the extension (toolstrip) catch backspace key press but it does catches a normal key press like an enter key press or a simple letter?

Furthermore I’m considering letting an “enter” key press in the input field call the TwitterMe() function instead of letting the button (id=”submitMe”) doing so.

If you got some thoughts on this please comment this post.

Now for the changes and improvements of the new version of the extension. As Aaron suggested in my last post as a comment to the first and earlier version I let the Twitter-icon be a controller for toggling the visibility of the input and button. This works quite well after I decided to use jQuery as the JavaScript framework in this extension. I would have liked to expand the extension in the height but I couldn’t get Chrome to “dynamically” change the height of the toolstrip, only the width. I think the below quote should be rewritten if it’s only possible “dynamically” change the height of the toolstrip.

The toolbar automatically detects how much space a toolstrip needs and reflows. So you can resize your toolstrip dynamically if you need a little more room temporarily. - http://dev.chromium.org/developers/design-documents/extensions/toolstrips

Aaron also asked why I didn’t use a XHR call to the (brilliant) Twitter API instead of using the server-layer and that me research the possibilities of such a solution. After some investigation it’s now working fantastic.

Furthermore I decided to kick out the username and password fields since they were ruining the flow of extension. Your username and password is now to be entered in the “twitter-interface.html” which now also is XHTML Strict 1.0 valid (if that matters anyway).

Underneath I’ll include the download link to the new version as well as some new screenshots. Have fun and comment please! :-)

Download link: http://e-x-e.dk/labs/chrome-twitter/twitter-addon_v_0_2.zip

screen0screen1

Did you enjoy this post? Have a look at the post before, in this post there are some more information about installing the add-on (extension): http://www.e-x-e.dk/2009/05/29/labs-twitter-add-on-extension-for-google-chrome/.

Translate: dansk

13 Responses to “Labs: Twitter Add-on (extension) for Google Chrome, new version – new post.”

  1. hey I posted your extension on chrome plugins forums: http://www.chromeplugins.org/google/chrome-plugins/tweeter-plugin-update-toolstrip-7818.html#post10836

    hope you dont mind ^^

    .:nadie:.

  2. I certainly don’t mind, thank you. Now I can get even more clicks ;)

    Thomas Stig Jacobsen

  3. Hello,

    i am from chromeplugins.org, i jst came accross your post via the thread jst mentioned above, its quite a nice extension, would like to ask you to come to our forum there and release your extension officialy over there. This would enable you to improve your extension and also give it a better exposure. Plus if there are any troubleshooting for the extension it could be directly solved there.

    Regards,

    Akshit

  4. Thank you for the comment Akshit. I’ll do so fairly quickly.

    Thomas Stig Jacobsen

  5. How do I install this, sorry I am not a programmer, but I installed several other extensions by clicking on a link. I downloaded this and entered my username and password in the html file.

    Thanks for all of your work!

    Brett

  6. Please view the previous post.

    Thomas Stig Jacobsen

  7. Hi there Thomas! I just merged your code with the code from Reddest’s tutorial from here http://www.switchonthecode.com/tutorials/building-a-twitter-extension-for-google-chrome .

    Now your script can shorten URL and fill the field :)

    alex

  8. [...] to parse the URL in the address bar to a twitter post inside another browser window and also to post from inside Chrome itself. Combining the two scripts, yielded quite a useable solution for a twitter [...]

    Chrome and Twitter | Forgot Yesterday

  9. The extension does not work for me, it does not show me the username and password fields, not even when I go to the chrome-extension://iakpobebhhhehjfpafjbdjiibejpgpjg/twitter-interface.html page. I gets stuck when I click on “Update status” as if it is waiting for something to happen that does not happen. Any idea?

    PhistucK

  10. You need to edit the username and password in the HTML file in order to post new twits

    Thomas Stig Jacobsen

  11. Oh, you could have just saved the settings in a bookmark, after filling them in.
    Thank you!

    PhistucK

  12. Hi, looks like a nice extension. Im having trouble with it though. When I try to run it the way you described or by using the menu way nothing happens. There is no bar/twitter icon at the bottom of the screen or any visible sign of the extension at all. Any suggestions?

    StoogeNuge

  13. @StoogeNuge

    You need to edit the magnifest.json by adding

    “browser_action”: {

    “default_icon”: “icon_twitter.png”
    }

    then reload the extension.

    hafiztang

Leave a Reply