Skip to content

Commit

Permalink
show firefox warning upon closing
Browse files Browse the repository at this point in the history
  • Loading branch information
suan authored and Suan-Aik Yeo committed Apr 26, 2012
1 parent 594da39 commit 04a135c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.html
Expand Up @@ -10,7 +10,14 @@
document.body.innerHTML = newHTML;
});
socket.on('die', function(newHTML) {
window.open('', '_self', '');window.close();
window.open('', '_self', '');
window.close();

var firefoxWarning =
"<h1>Oops!</h1>" +
"<h3>Firefox doesn't allow windows to self-close.</h3>" +
"<h3>If you want the preview window to close automatically like in other browsers, go to about:config and set dom.allow_scripts_to_close_windows to true.</h3>"
document.body.innerHTML = firefoxWarning;
});
});
</script>
Expand Down

0 comments on commit 04a135c

Please sign in to comment.