Miles1999 commited on
Commit
944ca37
Β·
verified Β·
1 Parent(s): f79d2c0

Update evaluation/eval_interfaces/reg_cot_eval_interface.html

Browse files
evaluation/eval_interfaces/reg_cot_eval_interface.html CHANGED
@@ -93,7 +93,7 @@ button:hover{opacity:.9}
93
 
94
  <!-- MAIN CONTROLS (now vertical on the right) -->
95
  <div class="controls" style="display:none">
96
-
97
  <p>Is the final answer correct or incorrect?</p>
98
  <button id="btn-correct">Correct</button>
99
  <button id="btn-wrong">Incorrect</button>
@@ -119,7 +119,42 @@ button:hover{opacity:.9}
119
 
120
  <!-- ──────────── SCRIPT ──────────── -->
121
  <script>
122
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  /* utilities */
124
  const shuffle=a=>{for(let i=a.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));[a[i],a[j]]=[a[j],a[i]];}return a;}
125
  const nowISO=()=>new Date().toISOString();
 
93
 
94
  <!-- MAIN CONTROLS (now vertical on the right) -->
95
  <div class="controls" style="display:none">
96
+ <button id="full_screen" style="visibility:hidden">Enter Full Screen</button>
97
  <p>Is the final answer correct or incorrect?</p>
98
  <button id="btn-correct">Correct</button>
99
  <button id="btn-wrong">Incorrect</button>
 
119
 
120
  <!-- ──────────── SCRIPT ──────────── -->
121
  <script>
122
+ document.addEventListener("DOMContentLoaded", () => {
123
+ const btn = document.getElementById('full_screen');
124
+
125
+ function isFullscreen() {
126
+ return document.fullscreenElement ||
127
+ document.webkitFullscreenElement ||
128
+ document.mozFullScreenElement ||
129
+ document.msFullscreenElement;
130
+ }
131
+
132
+ // Show button only if NOT in fullscreen at start
133
+ if (!isFullscreen()) {
134
+ btn.style.visibility = 'visible';
135
+ }
136
+
137
+ btn.addEventListener('click', () => {
138
+ if (!isFullscreen()) {
139
+ document.documentElement.requestFullscreen?.() ||
140
+ document.documentElement.webkitRequestFullscreen?.() ||
141
+ document.documentElement.mozRequestFullScreen?.() ||
142
+ document.documentElement.msRequestFullscreen?.();
143
+ }
144
+ });
145
+
146
+ function toggleButton() {
147
+ if (isFullscreen()) {
148
+ btn.style.visibility = 'hidden'; // Hide in fullscreen
149
+ } else {
150
+ btn.style.visibility = 'visible'; // Show when not fullscreen
151
+ }
152
+ }
153
+ document.addEventListener('fullscreenchange', toggleButton);
154
+ document.addEventListener('webkitfullscreenchange', toggleButton);
155
+ document.addEventListener('mozfullscreenchange', toggleButton);
156
+ document.addEventListener('MSFullscreenChange', toggleButton);
157
+ });
158
  /* utilities */
159
  const shuffle=a=>{for(let i=a.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));[a[i],a[j]]=[a[j],a[i]];}return a;}
160
  const nowISO=()=>new Date().toISOString();