()
| 167 | let _lastFilePickerOpen = 0; |
| 168 | |
| 169 | function triggerFilePickerOnce() { |
| 170 | const now = Date.now(); |
| 171 | // ignore any extra calls within 400ms of the last open |
| 172 | if (now - _lastFilePickerOpen < 400) return; |
| 173 | _lastFilePickerOpen = now; |
| 174 | |
| 175 | const fi = document.getElementById('file'); |
| 176 | if (fi) { |
| 177 | fi.click(); |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | // Wire the "Choose files" button so it always uses the guarded trigger |
| 182 | function wireChooseButton() { |
no outgoing calls
no test coverage detected