mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FEATURE: Youtube Short onebox support (#19335)
* FEATURE: Youtube Shorts onebox support Co-authored-by: Canapin <canapin@gmail.com>
This commit is contained in:

committed by
GitHub

parent
57fe57e7ce
commit
d247e5d37c
@ -103,6 +103,11 @@ module Onebox
|
||||
id ||= uri.path[/\/embed\/([\w\-]+)/, 1]
|
||||
end
|
||||
|
||||
# https://www.youtube.com/shorts/wi2jAtpBl0Y
|
||||
if uri.path["/shorts/"]
|
||||
id ||= uri.path[/\/shorts\/([\w\-]+)/, 1]
|
||||
end
|
||||
|
||||
# https://www.youtube.com/watch?v=Z0UISCEe52Y
|
||||
id ||= params['v']
|
||||
|
||||
|
Reference in New Issue
Block a user