mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-04 18:48:01 +08:00
15 lines
297 B
Ruby
15 lines
297 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "../mixins/twitch_onebox"
|
|
|
|
class Onebox::Engine::TwitchVideoOnebox
|
|
def self.twitch_regexp
|
|
%r{^https?://(?:www\.)?twitch\.tv/videos/([0-9]+)}
|
|
end
|
|
|
|
include Onebox::Mixins::TwitchOnebox
|
|
|
|
def query_params
|
|
"video=v#{twitch_id}"
|
|
end
|
|
end
|