Skip to content

Instantly share code, notes, and snippets.

@micho
Created March 16, 2011 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save micho/872697 to your computer and use it in GitHub Desktop.
Save micho/872697 to your computer and use it in GitHub Desktop.
Cloudapp plugin for Talkerapp
plugin.onMessageSend = function (event) {
var match, url, content;
if (match = event.content.match(/(https?:\/\/cl.ly\/[^\/]+)(\/[^\/]+)*/)) {
url = match[1] || false;
content = match[2] || false;
if (!content || content.indexOf('/content') != -1) {
event.content = event.content.replace(url, url+'/content#.png');
Talker.sendMessage(event, "");
Talker.getMessageBox().val('');
return false;
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment