asciidoctor-html 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,8 @@ module Asciidoctor
8
8
  module Flip
9
9
  FLIP = <<~JS.freeze
10
10
  (function() {
11
+ const urlParams = new URLSearchParams(window.location.search);
12
+
11
13
  // Holds replaced pagination links to prev/next chapter
12
14
  const chapPagination = {
13
15
  prevChap: null,
@@ -203,13 +205,19 @@ module Asciidoctor
203
205
  addEventListener('hashchange', flip);
204
206
  addEventListener('keyup', function(e) {
205
207
  switch(e.key) {
206
- case 'ArrowLeft': move('left'); break;
207
- case 'ArrowRight': move('right'); break;
208
208
  case 'q':
209
209
  case 'Escape':
210
210
  page.classList.contains('presentation') && changeViewmode('multi');
211
211
  }
212
212
  });
213
+ addEventListener('keydown', function(e) {
214
+ if(e.altKey) return;
215
+
216
+ switch(e.key) {
217
+ case 'ArrowLeft': move('left'); break;
218
+ case 'ArrowRight': move('right');
219
+ }
220
+ });
213
221
  document.querySelectorAll('a').forEach(el => {
214
222
  el.addEventListener('click', () => {
215
223
  const scrollEl = getScrollEl();
@@ -232,6 +240,8 @@ module Asciidoctor
232
240
  changeViewmode(viewmode);
233
241
  }));
234
242
 
243
+ const viewmode = urlParams.get('viewmode');
244
+ viewmode && changeViewmode(viewmode);
235
245
  flip();
236
246
 
237
247
  ADHT.move = move;
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Asciidoctor
4
4
  module Html
5
- VERSION = "2.3.0"
5
+ VERSION = "2.3.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-html
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ravi Rajani