(url: string, extensionName: string)
| 143 | } |
| 144 | |
| 145 | function setSelectedGalleryImage(url: string, extensionName: string): void { |
| 146 | const image = document.getElementById( |
| 147 | "extension-details-image" |
| 148 | ) as HTMLImageElement | null; |
| 149 | const gallery = document.getElementById("extension-details-gallery"); |
| 150 | if (!image) return; |
| 151 | |
| 152 | image.src = url; |
| 153 | image.alt = `${extensionName} screenshot`; |
| 154 | |
| 155 | gallery?.querySelectorAll<HTMLButtonElement>(".extension-details-thumbnail-btn").forEach((button) => { |
| 156 | const isActive = button.dataset.galleryImageUrl === url; |
| 157 | button.classList.toggle("active", isActive); |
| 158 | if (isActive) { |
| 159 | button.setAttribute("aria-current", "true"); |
| 160 | } else { |
| 161 | button.removeAttribute("aria-current"); |
| 162 | } |
| 163 | }); |
| 164 | } |
| 165 | |
| 166 | function openDetailsModal( |
| 167 | extensionId: string, |
no outgoing calls
no test coverage detected