Download change_button_text.js from j21/Rodin: direct link, hf CLI and curl.
- Browser
- Download file 443 Bytes
-
https://huggingface.co/spaces/j21/Rodin/resolve/main/change_button_text.js
- Command line
-
hf download hf://spaces/j21/Rodin/change_button_text.js
-
curl -L -o change_button_text.js https://huggingface.co/spaces/j21/Rodin/resolve/main/change_button_text.js
443 Bytes
| console.log('DOMContentLoaded'); | |
| document.addEventListener('DOMContentLoaded', function() { | |
| var buttonGenerate = document.getElementById('button_generate'); | |
| var clickedOnce = false; // 用来追踪按钮是否被点击过一次 | |
| buttonGenerate.addEventListener('click', function() { | |
| if (!clickedOnce) { | |
| this.innerText = 'Redo'; | |
| clickedOnce = true; // 更新状态为已点击 | |
| } | |
| }); | |
| }); |