diff --git a/web/app/controllers/problem.php b/web/app/controllers/problem.php index a3a1eee..1b9b4ea 100644 --- a/web/app/controllers/problem.php +++ b/web/app/controllers/problem.php @@ -580,10 +580,18 @@ if (UOJContest::cur()) { // Change hash for page-reload $('.nav-pills a').on('shown.bs.tab', function(e) { + var hash = e.target.hash; + if (e.target.hash == '#statement') { - window.location.hash = ''; + hash = '#'; + } + + if (window.history.pushState) { + // Update the address bar + window.history.pushState({}, '', hash); } else { - window.location.hash = e.target.hash; + // Fallback for the old browsers which do not have `history.pushState()` + window.location.hash = hash; } }); }); diff --git a/web/app/controllers/super_manage.php b/web/app/controllers/super_manage.php index c576e83..f39c980 100644 --- a/web/app/controllers/super_manage.php +++ b/web/app/controllers/super_manage.php @@ -1340,21 +1340,6 @@ if ($cur_tab == 'index') { - -