Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
Simple Chrome extension
<script src="jquery-1.4.2.min.js"></script>
var bitly = {
login: "your_login",
api_key: "your_api_key"
chrome.browserAction.onClicked.addListener(function(tab) {
$.get("" + bitly.login +
"&apiKey=" + bitly.api_key + "&longUrl=" + tab.url, function(response) {
chrome.tabs.create({ url: "" +});
"name": "Tweet this page",
"version": "1.0",
"description": "Shorten the current URL and put it a tweet.",
"browser_action": {
"default_icon": "icon.png"
"background_page": "background.html",
"permissions": [
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.