handleKey(): if .charCode is undefined, use .keyCode (Opera compatible.)

This commit is contained in:
Sigbjorn Finne 2010-12-05 09:50:00 +01:00
parent fc46e50289
commit 6cdbfc0c15

View File

@ -102,7 +102,7 @@ function setup_part3(){
/////////////////////////
function handleKey(e){
var c = e.charCode;
var c = e.charCode || e.keyCode;
c = String.fromCharCode(c);
if('zx<>?np'.indexOf(c)==-1) return;
if((c=='x' || c=='<') && zoom>1) setZoom(zoom/1.2);