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

Version Path
dejan-auto_html-1.2.0 lib/auto_html/filters/dailymotion.rb
auto_html-1.5.1.1 lib/auto_html/filters/dailymotion.rb
auto_html-1.6.0 lib/auto_html/filters/dailymotion.rb
auto_html-1.5.3 lib/auto_html/filters/dailymotion.rb
auto_html-1.5.2 lib/auto_html/filters/dailymotion.rb
auto_html-1.5.1 lib/auto_html/filters/dailymotion.rb
auto_html-1.5.0 lib/auto_html/filters/dailymotion.rb
marcosinger-auto_html-1.3.6 lib/auto_html/filters/dailymotion.rb
galetahub-auto_html-1.0.1 lib/auto_html/filters/dailymotion.rb
auto_html-1.4.2 lib/auto_html/filters/dailymotion.rb
auto_html-1.4.1 lib/auto_html/filters/dailymotion.rb
auto_html-1.4.0 lib/auto_html/filters/dailymotion.rb
auto_html-1.3.7 lib/auto_html/filters/dailymotion.rb
marcosinger-auto_html-1.3.5 lib/auto_html/filters/dailymotion.rb
marcosinger-auto_html-1.3.4 lib/auto_html/filters/dailymotion.rb
auto_html-1.3.6 lib/auto_html/filters/dailymotion.rb
auto_html-1.3.5 lib/auto_html/filters/dailymotion.rb
auto_html-1.3.4 lib/auto_html/filters/dailymotion.rb
auto_html-1.3.3 lib/auto_html/filters/dailymotion.rb
auto_html-1.3.2 lib/auto_html/filters/dailymotion.rb