(el)
| 388 | } |
| 389 | |
| 390 | async handleClick(el) { |
| 391 | const type = el.dataset.type; |
| 392 | const index = Number.parseInt(el.dataset.index, 10); |
| 393 | |
| 394 | let itemDef; |
| 395 | if (type === "active") { |
| 396 | const itemIndex = settings.value.quicktoolsItems[index]; |
| 397 | itemDef = items[itemIndex]; |
| 398 | } else { |
| 399 | itemDef = items[index]; |
| 400 | } |
| 401 | |
| 402 | if (itemDef) { |
| 403 | const desc = description(itemDef.id); |
| 404 | window.toast(desc, 2000); |
| 405 | } |
| 406 | } |
| 407 | |
| 408 | destroy() { |
| 409 | if (this.longPressTimer) clearTimeout(this.longPressTimer); |
no test coverage detected