This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.makeSearchCommand({ | |
name: "python", | |
url: "http://docs.python.org/search.html?q={QUERY}", | |
icon: "http://docs.python.org/_static/py.png", | |
homepage: "http://twitter.com/ziru", | |
author: { name: "Ziru"}, | |
license: "MPL", | |
description: "Searches docs.python.org for your words." | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TWEET_MAXLEN = 140; | |
const TWEET_SHORT_URL_MAX_LENGTH = 17; | |
const URL_SHORTENER_API = 'http://api.bit.ly/shorten?version=2.0.1&format=text&login=bitlyapidemo&apiKey=R_0da49e0a9118ff35f52f629d2d71bf07&longUrl='; | |
var MultiStatusServicesUpdater = { | |
registeredServices: [ | |
{ selector: '#TWITTER', method: 'updateTwitter' }, | |
// { selector: '#KAIXIN', method: 'updateKaixin' }, | |
{ selector: '#SINA', method: 'updateSina' }, | |
// { selector: '#QQ', method: 'updateQQ' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "my.tweet", | |
preview: "Insert your latest tweet as a signature.", | |
execute: function(){ | |
var userId = 'YOUR TWITTER ID'; | |
var twitterQueryUrl = 'http://twitter.com/statuses/user_timeline/' + userId + '.json?count=5'; | |
jQuery.get(twitterQueryUrl, null, function(data) { | |
if (!data) return; | |
var latestStatus; | |
for (var i = 0; i < data.length; i++) { |