Skip to content

Instantly share code, notes, and snippets.

@swdyh
Created May 22, 2009 02:06
Show Gist options
  • Save swdyh/115874 to your computer and use it in GitHub Desktop.
Save swdyh/115874 to your computer and use it in GitHub Desktop.
// set your twitter id and passowrd
var twitter_id = 'foo'
var twitter_password = 'bar'
var tw = new jetpack.lib.twitter.Twit(twitter_id, twitter_password)
jetpack.statusBar.append({
html: '<img src="http://assets1.twitter.com/images/favicon.ico" />',
width: 20,
onReady: function(widget){
$(widget).click(function() {
var w = jetpack.tabs.focused.contentWindow
var text = w.prompt('tweet')
if (text) {
tw.tweet(text, null, function() {
jetpack.notifications.show('updated')
})
}
})
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment