2020-10-26 20:45:38 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
|
|
|
|
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE
|
2019-11-14 20:21:53 +00:00
|
|
|
class WidgetController < ApplicationController
|
2021-02-24 17:52:51 +00:00
|
|
|
# we don't want anything to intefer with loading these docs
|
|
|
|
skip_forgery_protection
|
2020-10-26 20:45:38 +00:00
|
|
|
|
2021-02-24 17:52:51 +00:00
|
|
|
def v2
|
|
|
|
expires_in 10.minutes
|
|
|
|
head :found, location: helpers.asset_pack_url('donate-button-v2.js'), content_type: 'application/javascript'
|
|
|
|
end
|
2019-11-15 22:28:55 +00:00
|
|
|
|
2021-02-24 17:52:51 +00:00
|
|
|
def i18n
|
|
|
|
head :found, location: helpers.asset_pack_url('i18n.js'), content_type: 'application/javascript'
|
|
|
|
end
|
2019-11-27 23:05:38 +00:00
|
|
|
|
2021-02-24 17:52:51 +00:00
|
|
|
def v1_css
|
|
|
|
expires_in 10.minutes
|
|
|
|
head :found, location: helpers.stylesheet_url('widget/donate-button.css'), content_type: 'text/css'
|
|
|
|
end
|
2019-11-27 23:05:38 +00:00
|
|
|
|
2021-02-24 17:52:51 +00:00
|
|
|
def v2_css
|
|
|
|
expires_in 10.minutes
|
|
|
|
head :found, location: helpers.stylesheet_url('widget/donate-button-v2.css'), content_type: 'text/css'
|
|
|
|
end
|
2019-11-14 20:21:53 +00:00
|
|
|
end
|