| 290 | }); |
| 291 | |
| 292 | function handleClick(event) { |
| 293 | const $target = event.target; |
| 294 | const { action } = $target.dataset; |
| 295 | if (action === "search") { |
| 296 | if (currSection === "all") { |
| 297 | isSearching = true; |
| 298 | searchBar( |
| 299 | $currList, |
| 300 | (hide) => { |
| 301 | hideSearchBar = hide; |
| 302 | isSearching = false; |
| 303 | }, |
| 304 | undefined, |
| 305 | searchRemotely, |
| 306 | ); |
| 307 | return; |
| 308 | } else { |
| 309 | isSearching = true; |
| 310 | searchBar($currList, (hide) => { |
| 311 | hideSearchBar = hide; |
| 312 | isSearching = false; |
| 313 | }); |
| 314 | return; |
| 315 | } |
| 316 | } |
| 317 | if (action === "open") { |
| 318 | Plugin($target.dataset, onInstall, onUninstall); |
| 319 | return; |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | function render(section) { |
| 324 | if (currSection === section) return; |