diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2017-06-19 09:52:56 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2017-06-19 09:52:56 +0200 |
commit | 76eea30083b9b0ea4bdfef39c5f04b03bcb647f5 (patch) | |
tree | bc57765a949f50d3ec49f5f6aaa1326c2ef0574b | |
parent | af6754bfb73526ab4ce39631f223cf25eaa9e976 (diff) | |
download | fosdem-2018-presentation-76eea30083b9b0ea4bdfef39c5f04b03bcb647f5.tar fosdem-2018-presentation-76eea30083b9b0ea4bdfef39c5f04b03bcb647f5.tar.gz |
zoom.js uses ctrl+click for linux, alt+click for others #1909
-rw-r--r-- | plugin/zoom-js/zoom.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugin/zoom-js/zoom.js b/plugin/zoom-js/zoom.js index ce9c6e0..dc5140e 100644 --- a/plugin/zoom-js/zoom.js +++ b/plugin/zoom-js/zoom.js @@ -1,7 +1,9 @@ // Custom reveal.js integration (function(){ document.querySelector( '.reveal .slides' ).addEventListener( 'mousedown', function( event ) { - var modifier = ( Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : 'alt' ) + 'Key'; + var defaultModifier = /Linux/.test( window.navigator.platform ) ? 'ctrl' : 'alt'; + + var modifier = ( Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : defaultModifier ) + 'Key'; var zoomLevel = ( Reveal.getConfig().zoomLevel ? Reveal.getConfig().zoomLevel : 2 ); if( event[ modifier ] && !Reveal.isOverview() ) { |