discourse/lib/oneboxer/image_onebox.rb

14 lines
250 B
Ruby
Raw Normal View History

2013-02-05 14:16:51 -05:00
require_dependency 'oneboxer/base_onebox'
module Oneboxer
class ImageOnebox < BaseOnebox
matcher /^(https?:)?\/\/.+\.(png|jpg|jpeg|gif|bmp|tif|tiff)$/i
2013-02-05 14:16:51 -05:00
def onebox
2013-06-29 14:17:25 -04:00
Oneboxer::BaseOnebox.image_html(@url, nil, @url)
2013-02-05 14:16:51 -05:00
end
end
end