soiz1 commited on
Commit
73e25d2
·
verified ·
1 Parent(s): e717773

Create static/script.js

Browse files
Files changed (1) hide show
  1. static/script.js +10 -0
static/script.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener("DOMContentLoaded", () => {
2
+ const tokenInput = document.getElementById("token");
3
+
4
+ // 保存されたトークンを自動で読み込み
5
+ tokenInput.value = localStorage.getItem("hf_token") || "";
6
+
7
+ tokenInput.addEventListener("input", () => {
8
+ localStorage.setItem("hf_token", tokenInput.value);
9
+ });
10
+ });