Sha256: 0d3e5511a2f48de807f1ce8d53c80792a074338fb6ad192c9722b9dc8de6f90f
Contents?: true
Size: 882 Bytes
Versions: 5
Compression:
Stored size: 882 Bytes
Contents
AutoHtml.add_filter(:vimeo).with(:width => 440, :height => 248) do |text, options| text.gsub(/http:\/\/(www.)?vimeo\.com\/([A-Za-z0-9._%-]*)((\?|#)\S+)?/) do vimeo_id = $2 %{<object width="#{options[:width]}" height="#{options[:height]}"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=#{vimeo_id}&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=#{vimeo_id}&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="#{options[:width]}" height="#{options[:height]}"></embed></object>} end end
Version data entries
5 entries across 5 versions & 2 rubygems