Skip to content

Commit

Permalink
Move countdown.html.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Jul 6, 2020
1 parent f050137 commit 54690f6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
send_file File.join(settings.views, "live.html")
end

get "/countdown" do
get "/countdown.html" do
content_type :html
SecureHeaders.use_secure_headers_override(request, :countdown)
send_file File.join(settings.public_folder, "countdown.html")
send_file File.join(settings.views, "countdown.html")
end

# This route is useful together with this bookmarklet:
Expand Down
2 changes: 1 addition & 1 deletion public/countdown.html → views/countdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}

function init() {
// Parse query string, e.g: /countdown?date=2018-09-27T03:30:00Z
// Parse query string, e.g: /countdown.html?date=2018-09-27T03:30:00Z
var params = {};
window.location.search.substr(1).split("&").forEach(function(param) {
param = param.split("=");
Expand Down
2 changes: 1 addition & 1 deletion views/youtube.atom.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
title += " (scheduled for #{updated.readable(@tz)})"
content_extra = <<~EOF
<p>Live broadcast scheduled to start at: #{updated.readable(@tz)}.</p>
<iframe width="640" height="50" src="#{request.root_url}/countdown?date=#{updated}" frameborder="0" scrolling="yes" referrerpolicy="no-referrer"></iframe>
<iframe width="640" height="50" src="#{request.root_url}/countdown.html?date=#{updated}" frameborder="0" scrolling="yes" referrerpolicy="no-referrer"></iframe>
EOF
end
end
Expand Down

0 comments on commit 54690f6

Please sign in to comment.