discourse/lib/oneboxer/image_onebox.rb

14 lines
233 B
Ruby
Raw Normal View History

2013-02-06 03:16:51 +08:00
require_dependency 'oneboxer/base_onebox'
module Oneboxer
class ImageOnebox < BaseOnebox
matcher /^https?:\/\/.*\.(jpg|png|gif|jpeg)$/
def onebox
2013-06-30 02:17:25 +08:00
Oneboxer::BaseOnebox.image_html(@url, nil, @url)
2013-02-06 03:16:51 +08:00
end
end
end