Skip to content

Instantly share code, notes, and snippets.

@garyharan
Created January 6, 2010 17:22
Show Gist options
  • Save garyharan/270431 to your computer and use it in GitHub Desktop.
Save garyharan/270431 to your computer and use it in GitHub Desktop.
plugin.onMessageReceived = function(event){
var vimeo_expression = /^(?:http\S+vimeo\.com\/)(\d+)/;
var vimeo_match = event.content.match(vimeo_expression);
if (vimeo_match){
Talker.insertMessage(event, '<object width="400" height="220">'
+ '<param name="allowfullscreen" value="true" />'
+ '<param name="allowscriptaccess" value="always" />'
+ '<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=' + vimeo_match[1]
+ '&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" />'
+ '<embed src="http://vimeo.com/moogaloop.swf?clip_id=' + vimeo_match[1] + '&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;'
+ 'show_portrait=0&amp;color=&amp;fullscreen=1" '
+ 'type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="220">'
+ '</embed></object>'
);
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment