diff options
author | Andrew Dolgov <[email protected]> | 2018-06-29 17:41:28 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-06-29 17:41:28 +0300 |
commit | f46c3f561f6d079a4ac8fb8ba0134508479a9eff (patch) | |
tree | 093d74241b942a6a5bc317e71dc52c3be5e756f4 /js/read.js | |
parent | 74de43f86f614b5771ffb3dd16d43b0fcbf95a36 (diff) |
minor fixes for fullscreen mode, UI tweak for TOC icon
Diffstat (limited to 'js/read.js')
-rw-r--r-- | js/read.js | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -3,7 +3,15 @@ var _store_position = 0; function request_fullscreen() { - document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); + var element = document.documentElement; + + if (element.requestFullscreen) { + element.requestFullscreen(); + } else if (element.mozRequestFullScreen) { + element.mozRequestFullScreen(); + } else if (element.webkitRequestFullScreen) { + element.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); + } } function disable_fullscreen() { |