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 | |
parent | 74de43f86f614b5771ffb3dd16d43b0fcbf95a36 (diff) |
minor fixes for fullscreen mode, UI tweak for TOC icon
-rw-r--r-- | js/read.js | 10 | ||||
-rw-r--r-- | js/reader.js | 1 | ||||
-rw-r--r-- | read.html | 5 | ||||
-rw-r--r-- | themes/mocca.css | 2 | ||||
-rw-r--r-- | themes/night.css | 2 | ||||
-rw-r--r-- | themes/plan9.css | 2 |
6 files changed, 15 insertions, 7 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() { diff --git a/js/reader.js b/js/reader.js index 6d25801..255ee91 100644 --- a/js/reader.js +++ b/js/reader.js @@ -20,7 +20,6 @@ $(document).ready(function() { parent.show_ui(false); } else { parent.show_ui(true); - parent.disable_fullscreen(); } }); @@ -723,7 +723,7 @@ }); rendition.on('rendered', function(chapter) { - $(".chapter").html(""); + $(".chapter").html($("<span>").addClass("glyphicon glyphicon-th-list")); try { var location = book.rendition.currentLocation(); @@ -761,7 +761,8 @@ }); - if (toc_entry) $(".chapter").html(toc_entry.label); + if (toc_entry && toc_entry.label.trim()) + $(".chapter").html(toc_entry.label); } } catch (e) { diff --git a/themes/mocca.css b/themes/mocca.css index fd27f9c..9005561 100644 --- a/themes/mocca.css +++ b/themes/mocca.css @@ -1,4 +1,4 @@ -body, .loading { +body, .loading, html:-webkit-full-screen { background : #3B3228; color : #D0C8C6; } diff --git a/themes/night.css b/themes/night.css index 12c6d87..3b451ad 100644 --- a/themes/night.css +++ b/themes/night.css @@ -1,4 +1,4 @@ -body, .loading { +body, .loading, html:-webkit-full-screen { background : black; color : #ccc; } diff --git a/themes/plan9.css b/themes/plan9.css index a8fbcd7..d3d25c8 100644 --- a/themes/plan9.css +++ b/themes/plan9.css @@ -1,4 +1,4 @@ -body, .loading { +body, .loading, html:-webkit-full-screen { background : #FFFFE8; color : #424242; } |