()
| 81 | } |
| 82 | |
| 83 | export function showKeyboxRepo() { |
| 84 | if (!overlay || !iframe) return; |
| 85 | overlay.classList.remove('closing'); |
| 86 | if (!overlay.classList.contains('hidden')) return; |
| 87 | |
| 88 | if (isLoaded) { |
| 89 | stopHandshake(); |
| 90 | const newIframe = createIframe(); |
| 91 | overlay.replaceChild(newIframe, iframe); |
| 92 | iframe = newIframe; |
| 93 | } else { |
| 94 | isLoaded = true; |
| 95 | } |
| 96 | |
| 97 | showLoading(); |
| 98 | iframe.src = `${KEYBOX_REPO_URL}/${lang}`; |
| 99 | overlay.classList.remove('hidden'); |
| 100 | |
| 101 | history.pushState({ keyboxRepo: true }, '', ''); |
| 102 | window.addEventListener('popstate', handlePopState); |
| 103 | } |
| 104 | |
| 105 | export function close() { |
| 106 | if (overlay?.classList.contains('hidden') || overlay?.classList.contains('closing')) return; |
nothing calls this directly
no test coverage detected