# frozen_string_literal: true module Onebox module Engine class SteamStoreOnebox include Engine include StandardEmbed always_https matches_regexp(%r{^https?://store\.steampowered\.com/app/\d+}) requires_iframe_origins "https://store.steampowered.com" def placeholder_html og = get_opengraph <<-HTML

#{og.title}

#{og.description}

HTML end def to_html iframe_url = @url[%r{https?://store\.steampowered\.com/app/\d+}].gsub("/app/", "/widget/") escaped_src = ::Onebox::Helpers.normalize_url_for_output(iframe_url) <<-HTML HTML end end end end