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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/assets/css/jupyterlite-repl.css +1 -1
- data/assets/css/styles.css +2 -2
- data/lib/asciidoctor/html/flip.rb +12 -2
- data/lib/asciidoctor/html/version.rb +1 -1
- metadata +1 -1
|
@@ -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;
|