diff --git a/app/controllers/contests_controller.rb b/app/controllers/contests_controller.rb index a9e829a..72fa5ef 100644 --- a/app/controllers/contests_controller.rb +++ b/app/controllers/contests_controller.rb @@ -81,7 +81,11 @@ class ContestsController < ApplicationController filter_contestants_per_category @puzzles = @contest.puzzles.order(:id) @action_name = t("helpers.buttons.refresh") - @action_path = "/public/#{@contest.friendly_id}" + if params.key?(:category) + @action_path = "/public/#{@contest.friendly_id}?category=#{params[:category]}" + else + @action_path = "/public/#{@contest.friendly_id}" + end render :scoreboard end diff --git a/app/views/contests/scoreboard.html.slim b/app/views/contests/scoreboard.html.slim index b3e4960..55a1e51 100644 --- a/app/views/contests/scoreboard.html.slim +++ b/app/views/contests/scoreboard.html.slim @@ -1,10 +1,3 @@ -javascript: - function refresh() { - const el = document.querySelector('input[type="checkbox"]'); - if (el.checked) location.replace("/public/#{@contest.friendly_id}?refresh=1") - setTimeout(refresh, 5000); - } - css: @media (max-width: 800px) { a.btn { display: none; }