mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-08 04:48:44 +00:00
Make sure no-js users can still use auto-refresh
This commit is contained in:
parent
9109e98898
commit
777ba3ef59
1 changed files with 10 additions and 2 deletions
|
@ -7,6 +7,8 @@
|
|||
@{
|
||||
Layout = "Layouts/BaseLayout";
|
||||
Model.Title = "Debug - Room Visualizer";
|
||||
|
||||
const int refreshSeconds = 5;
|
||||
}
|
||||
|
||||
<script>
|
||||
|
@ -14,7 +16,7 @@
|
|||
|
||||
setTimeout(() => {
|
||||
if (shouldRefresh) window.location.reload();
|
||||
}, 5000);
|
||||
}, @(refreshSeconds * 1000));
|
||||
|
||||
function stopRefreshing() {
|
||||
shouldRefresh = false;
|
||||
|
@ -26,7 +28,13 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<p>This page will automatically refresh every 5 seconds.</p>
|
||||
<p>This page will automatically refresh every @refreshSeconds seconds.</p>
|
||||
@* workaround for users w/o js*@
|
||||
<noscript>
|
||||
<b>You will not be able to disable auto-refresh without JavaScript. Please enable JavaScript for this functionality.</b><br>
|
||||
<meta http-equiv="refresh" content="@refreshSeconds">
|
||||
</noscript>
|
||||
|
||||
<p>@RoomHelper.Rooms.Count rooms</p>
|
||||
|
||||
<a href="/debug/roomVisualizer/createFakeRoom">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue