I am moving from Safari to Chrome and desperately miss the Safari zoom behavior. There's an extension dblclickzoomin that makes things zoom like safari whenever you doubleclick. However, this is supremely annoying! I double click to select full words of text, etc.!
Can I modify the code to make it work when I hold shift and double click?
The trigger bit of the code is:
init: function(){
window.addEventListener("dblclick",Zoomer,false);
},
Since shift-dblclick (or better, shift triple click) isn't a standard DOM trigger... does anyone have any ideas?
Thanks!!
Use the event.shiftKey property to determine if the Shift key was depressed during double-click:
window.addEventListener("dblclick", function(e){
if(e.shiftKey) {
Zoomer.apply(this, arguments); // call Zoomer with same `this` and args
}
}, false);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With