mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 14:19:49 +08:00
11 lines
271 B
Ruby
11 lines
271 B
Ruby
require_dependency 'oneboxer/oembed_onebox'
|
|
|
|
module Oneboxer
|
|
class TedOnebox < OembedOnebox
|
|
matcher /^https?\:\/\/(www\.)?ted\.com\/talks\/.*$/
|
|
def oembed_endpoint
|
|
"http://www.ted.com/talks/oembed.json?url=#{BaseOnebox.uriencode(@url)}"
|
|
end
|
|
end
|
|
end
|