Skip to content

Commit

Permalink
close the window when tweety exit
Browse files Browse the repository at this point in the history
  • Loading branch information
pomdtr committed Feb 12, 2024
1 parent c6cc0f6 commit 941c6d4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
params.delete("port");
const iframe = document.createElement("iframe");
iframe.src = `${base}/?${params}`;
window.onmessage = (e) => {
if (e.data === "close") {
window.close();
}
};

document.body.appendChild(iframe);
iframe.focus();
} catch (e) {
Expand Down

0 comments on commit 941c6d4

Please sign in to comment.