Permalink
Browse files

show firefox warning upon closing

  • Loading branch information...
1 parent 594da39 commit 04a135c25b2dc62c31bccebd72de24ac65999f49 @suan committed with Suan-Aik Yeo Apr 26, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 index.html
View
@@ -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>

0 comments on commit 04a135c

Please sign in to comment.