Download tasks/33/tests/oracle-runtime/clone/static/assignment.js from TIGER-Lab/WebsiteBench: direct link, hf CLI and curl.
- Browser
- Download file 793 Bytes
-
https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/33/tests/oracle-runtime/clone/static/assignment.js
- Command line
-
hf download hf://datasets/TIGER-Lab/WebsiteBench/tasks/33/tests/oracle-runtime/clone/static/assignment.js
-
curl -L -o assignment.js https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/33/tests/oracle-runtime/clone/static/assignment.js
793 Bytes
| (() => { | |
| const timer = document.querySelector("[data-assignment-timer]"); | |
| if (!timer) return; | |
| const expiresAt = Date.parse(timer.dataset.expiresAt || ""); | |
| if (!Number.isFinite(expiresAt)) return; | |
| const render = () => { | |
| const remaining = Math.max(0, Math.floor((expiresAt - Date.now()) / 1000)); | |
| const minutes = Math.floor(remaining / 60); | |
| const seconds = remaining % 60; | |
| timer.textContent = `${minutes}:${String(seconds).padStart(2, "0")} remaining`; | |
| if (remaining === 0) { | |
| document.querySelectorAll(".assignment-form input, .assignment-form button").forEach((control) => { | |
| control.disabled = true; | |
| }); | |
| window.location.reload(); | |
| return true; | |
| } | |
| return false; | |
| }; | |
| if (!render()) window.setInterval(render, 1000); | |
| })(); | |