add: button to start all players
这个提交包含在:
父节点
b00a936c6c
当前提交
6517d381af
共有 1 个文件被更改,包括 19 次插入 和 1 次删除
18
index.html
18
index.html
|
|
@ -59,6 +59,18 @@
|
|||
const nameInput = document.getElementById("nameInput");
|
||||
const addButton = document.getElementById("addButton");
|
||||
const resultsTable = document.getElementById("resultsTable");
|
||||
const startAllButton = document.getElementById("startAllButton");
|
||||
|
||||
startAllButton.addEventListener("click", () => {
|
||||
Object.keys(players).forEach((id) => {
|
||||
if (players[id].length === 0) {
|
||||
players[id].push(Date.now());
|
||||
}
|
||||
});
|
||||
setCookies(players);
|
||||
renderPlayers();
|
||||
reloadResultsTable();
|
||||
});
|
||||
|
||||
const getCookies = () => {
|
||||
const cookies = document.cookie.split("; ").reduce((acc, cookie) => {
|
||||
|
|
@ -214,6 +226,12 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<button id="startAllButton" class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600">
|
||||
Lancer tous les chronos
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const exportToCSV = () => {
|
||||
|
|
|
|||
正在加载…
在新工单中引用