Script Summary: Automatically shortens URLs before tweeting them.
Twitter has a limitation of 140 character length for status updates. Links of pages in dynamic sites are long and therefore allow very less for us to write. URL shortening allows you to make those links look very short while sharing and free up characters for you to write. Although there exist many URL shortening services, there is no way a user can automatically shorten long URLs before tweeting them from the new Twitter interface.
The script adds a "Shorten URLs" button below the text-box where tweets are written, not for old twitter. On clicking the button, long URLs are automatically selected and silently converted into short URLs.
For shortening the URL, ur.ly service is used. The shortened URL looks like http://ur.ly/sU11. This Google app engine based service is used for its simple API and high speed. You can slightly tweak the script to use your own favorite service and even with tracking and analytics if supported.
Feedback, suggestions, help, queries, etc. are always welcome.