mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Add SoundcloudOnebox to support http and https
This commit is contained in:
parent
f6db90dae7
commit
ee23a088ea
2 changed files with 10 additions and 1 deletions
10
lib/oneboxer/soundcloud_onebox.rb
Normal file
10
lib/oneboxer/soundcloud_onebox.rb
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
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
|
|
@ -45,7 +45,6 @@ module Oneboxer
|
||||||
Entry.new(/^https?:\/\/(?:www\.)?samsung\.com\/.+/),
|
Entry.new(/^https?:\/\/(?:www\.)?samsung\.com\/.+/),
|
||||||
Entry.new(/^https?:\/\/(?:www\.)?mashable\.com\/.+/),
|
Entry.new(/^https?:\/\/(?:www\.)?mashable\.com\/.+/),
|
||||||
Entry.new(/^https?:\/\/(?:www\.)?forbes\.com\/.+/),
|
Entry.new(/^https?:\/\/(?:www\.)?forbes\.com\/.+/),
|
||||||
Entry.new(/^https?:\/\/(?:www\.)?soundcloud\.com\/.+/),
|
|
||||||
Entry.new(/^https?:\/\/(?:www\.)?thefreedictionary\.com\/.+/),
|
Entry.new(/^https?:\/\/(?:www\.)?thefreedictionary\.com\/.+/),
|
||||||
Entry.new(/^https?:\/\/(?:www\.)?groupon\.com\/.+/),
|
Entry.new(/^https?:\/\/(?:www\.)?groupon\.com\/.+/),
|
||||||
Entry.new(/^https?:\/\/(?:www\.)?ikea\.com\/.+/),
|
Entry.new(/^https?:\/\/(?:www\.)?ikea\.com\/.+/),
|
||||||
|
|
Loading…
Reference in a new issue