()
| 324 | |
| 325 | // Update lock icon for the active tab |
| 326 | function updateLockIcon() { |
| 327 | if (activeTabId == INVALID_TAB_ID) { |
| 328 | return; |
| 329 | } |
| 330 | |
| 331 | let activeTab = tabs.get(activeTabId); |
| 332 | |
| 333 | let labelElement = document.getElementById('security-label'); |
| 334 | if (!labelElement) { |
| 335 | refreshControls(); |
| 336 | return; |
| 337 | } |
| 338 | |
| 339 | switch (activeTab.securityState) { |
| 340 | case 'insecure': |
| 341 | labelElement.className = 'label-insecure'; |
| 342 | break; |
| 343 | case 'neutral': |
| 344 | labelElement.className = 'label-neutral'; |
| 345 | break; |
| 346 | case 'secure': |
| 347 | labelElement.className = 'label-secure'; |
| 348 | break; |
| 349 | default: |
| 350 | labelElement.className = 'label-unknown'; |
| 351 | break; |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | // Update favorite status for the active tab |
| 356 | function updateFavoriteIcon() { |
no test coverage detected