mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-21 21:12:39 -05:00
10 lines
310 B
Ruby
10 lines
310 B
Ruby
require_dependency 'oneboxer/oembed_onebox'
|
|
|
|
module Oneboxer
|
|
class SoundcloudOnebox < OembedOnebox
|
|
matcher /^https?:\/\/(?:www\.)?soundcloud\.com\/.+$/
|
|
def oembed_endpoint
|
|
"http://soundcloud.com/oembed?url=#{BaseOnebox.uriencode(@url.sub('https://', 'http://'))}&format=json"
|
|
end
|
|
end
|
|
end
|