# frozen_string_literal: true require "onebox" class Onebox::Engine::VimeoOnebox include Onebox::Engine alias_method :default_onebox_to_html, :to_html def to_html if SiteSetting.lazy_videos_enabled && SiteSetting.lazy_vimeo_enabled video_id = oembed_data[:video_id] thumbnail_url = "https://vumbnail.com/#{oembed_data[:video_id]}.jpg" escaped_title = ERB::Util.html_escape(og_data.title) <<~HTML
HTML else default_onebox_to_html end end end