module Onebox module Engine class SteamStoreWidgetOnebox include Engine matches_regexp(/^(https?:\/\/)?([\da-z\.-]+)(steampowered.com\/)(.)+\/?$/) # DoTheSimplestThingThatCouldPossiblyWork def to_html # Use the Steam support iframe widget over https widget_url = @url.gsub('/app/','/widget/') widget_url = widget_url.gsub('http:','https:') "" rescue @url end # Placeholder is called at each interaction with editor, so do something less iframey def placeholder_html widget_url = @url.gsub('/app/','/widget/') widget_url = widget_url.gsub('http:','https:') "
Will be replaced with the real listing when posted.