-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a261c7
commit 5887551
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |