mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:11:38 +08:00
11 lines
310 B
Ruby
11 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
|