Created
January 6, 2010 17:22
-
-
Save garyharan/270431 to your computer and use it in GitHub Desktop.
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
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] | |
+ '&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" />' | |
+ '<embed src="http://vimeo.com/moogaloop.swf?clip_id=' + vimeo_match[1] + '&server=vimeo.com&show_title=1&show_byline=1&' | |
+ 'show_portrait=0&color=&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