{Carrer web log}


Blog about web design & development

TweetThisPage - bookmarklet for fast twitter posting

Friday, August 13, 2010 { 1 Comments }

Yesterday Twitter introduced the official (Tweet) Button and new API.

I was eager to try the new API and I build right away new Bookmarklet who can help you fast posting to Twitter from any web page.
How this works?

Install the bookmarklet


TweetThisPage - Drag the link to your browser bookmark toolbar


When you click the bookmarklet it will automatically open new browser window and put the page HTML Title and the link (the link will get shorten by official Twitter shortener) . If you select any text from the page it will insert the selected page and avoid inserting the HTML Title.

And that is it.

When should you use it?

When the web page or the blog doesn’t have tweet button and you want to avoid copy pasting the title and url.

Here are some screenshots, I used Daring Fireball blog like an example:

With no text selected:


With text selected:


Here is also the source code from the bookmarklet:

(function () {

var l,t,s,D = document;
l = encodeURIComponent(location.href);
t = encodeURIComponent(D.title);
s = encodeURIComponent(D.getSelection());

if(s.length != 0)
{window.open('http://twitter.com/share?text='+s+'&url='+l,'', 'width=533,height=232,toolbar=1,resizable=0'); }
else
{window.open('http://twitter.com/share?text='+t+'&url='+l, '', 'width=533,height=232,toolbar=1,resizable=0'); }

})()


You don’t know what bookmarklet is here is Wikipedia link.

I hope that you will find this tool useful.


1 Responses to “TweetThisPage - bookmarklet for fast twitter posting”

  1. // Blogger Beben Koben // 8/28/2010

    i can't say anything, it turns out bookmark can be like this too...
    cool cool ^^  

Post a Comment

<< Home

RSS IconTwitter icon Twitter icon Twitter icon

About Me <<<

Name: Vladimir Carrer
vladocar [at] gmail.com
Location: Verona, Italy
I'm a web designer, developer, teacher, speaker, generally web addicted ...

My projects <<<

§§Previous Posts <<<

Hand Drawn Icons
 

Other Profiles <<<

View Vladimir Carrer's profile on LinkedIn

Content is licensed under a Creative Commons Public Domain License