Sha256: 9f7f6ff54a91fb18a257e0e79403a4fbd8c008c250fb78a034833dc938facf35
Contents?: true
Size: 745 Bytes
Versions: 24
Compression:
Stored size: 745 Bytes
Contents
AutoHtml.add_filter(:dailymotion).with(:width => 480, :height => 360) do |text, options| text.gsub(/http:\/\/www\.dailymotion\.com.*\/video\/(.+)_*/) do video_id = $1 %{<object type="application/x-shockwave-flash" data="http://www.dailymotion.com/swf/#{video_id}&related=0" width="#{options[:width]}" height="#{options[:height]}"><param name="movie" value="http://www.dailymotion.com/swf/#{video_id}&related=0"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><a href="http://www.dailymotion.com/video/#{video_id}?embed=1"><img src="http://www.dailymotion.com/thumbnail/video/#{video_id}" width="#{options[:width]}" height="#{options[:height]}"/></a></object>} end end
Version data entries
24 entries across 24 versions & 4 rubygems