diff options
| author | altaf-creator <dev@altafcreator.com> | 2026-01-11 22:08:11 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2026-01-11 22:08:11 +0800 |
| commit | 5918e8e99b33e7853c83155551f7eb46b706e997 (patch) | |
| tree | 8421a9fa178e9f767aac2d3776f08e3b26220201 /frontend/start.js | |
| parent | 43ec4deea81d4ef84623c31df33b1c3cb037b0c2 (diff) | |
stupid
Diffstat (limited to 'frontend/start.js')
| -rw-r--r-- | frontend/start.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/frontend/start.js b/frontend/start.js index 3d76e53..608ed9e 100644 --- a/frontend/start.js +++ b/frontend/start.js @@ -2,7 +2,7 @@ const startbtn = document.getElementById("startbtn"); const urlParams = new URLSearchParams(window.location.search); data.machine_id = urlParams.get('machine'); -//remember +rememberUrl(); console.log(urlParams); startUpdateMachines(); @@ -49,3 +49,16 @@ startUpdateMachines(); startbtn.addEventListener("click", () => { start(); }); + +function rememberUrl() { + machineId = urlParams.get('machine'); + minutesDelta = 5; + expirationDate = new Date(date.getTime() + minutesDelta * 60000);; + browser.cookies.set({ + expirationDate: expirationDate.getTime(), + name: "last_used_url", + value: machineId, + url: "https://laundryweb.altafcreator.com", + secure: true, + }) +} |
