Sha256: 8d24bd7464e1ab9949c441e5ca140c97b0da7ca02332d5c4371f5bf9d1267021
Contents?: true
Size: 818 Bytes
Versions: 12
Compression:
Stored size: 818 Bytes
Contents
module Onebox module Engine class GfycatOnebox include Engine include StandardEmbed matches_regexp(/^https?:\/\/gfycat\.com\//) always_https def to_html oembed = get_oembed src = Nokogiri::HTML::fragment(oembed[:html]).at_css("iframe")["src"] <<-HTML <iframe src="#{src}" width="#{oembed[:width]}" height="#{oembed[:height]}" scrolling="no" frameborder="0" allowfullscreen> </iframe> HTML end def placeholder_html opengraph = get_opengraph <<-HTML <img src="#{opengraph[:image]}" width=""#{opengraph[:image_width]}" height=""#{opengraph[:image_height]}"> HTML end end end end
Version data entries
12 entries across 12 versions & 1 rubygems