Added some code for window.close() on Chrome - only supported with user action on FF 2.0 and up
parent
fc318b3d3d
commit
301a32fc36
5
vif.js
5
vif.js
|
@ -98,6 +98,11 @@ JVIV = function() {
|
||||||
switch(event.keyCode) {
|
switch(event.keyCode) {
|
||||||
case 81: // q
|
case 81: // q
|
||||||
loop.stop();
|
loop.stop();
|
||||||
|
/* The following line enables window.close() in Chrome and < FF2.0
|
||||||
|
FF above that require explicit user action to enable:
|
||||||
|
about:config -> dom.allow_scripts_to_close_windows=true
|
||||||
|
*/
|
||||||
|
window.open('', '_self', ''); // enables window.close() in Chrome and FF1.5 to enable FF1.5
|
||||||
window.close();
|
window.close();
|
||||||
break;
|
break;
|
||||||
case 37: // left
|
case 37: // left
|
||||||
|
|
Loading…
Reference in New Issue