Skip to content

Commit

Permalink
special tab
Browse files Browse the repository at this point in the history
  • Loading branch information
bit-turtle authored Nov 1, 2024
1 parent 6a261c7 commit 5887551
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions uncloseabletab.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head><title>You Can't Close Me!</title></head>
<body>
<h1>Can you do it?</h1>
<button onclick="window.onbeforeunload = function(){window.alert('The tab can be closed now')}">I'm Done</button>
<script>
window.onbeforeunload = function(){
window.open("https://bit-turtle.github.io/uncloseabletab.html", '_blank').focus();
}
</script>
</body>
</html>

0 comments on commit 5887551

Please sign in to comment.