Use full page navigation for double-tap chapter switching
This commit is contained in:
@@ -2576,12 +2576,7 @@ const chapterTmpl = `
|
|||||||
var INTERACTIVE = ['A', 'BUTTON', 'INPUT', 'SELECT', 'TEXTAREA', 'LABEL'];
|
var INTERACTIVE = ['A', 'BUTTON', 'INPUT', 'SELECT', 'TEXTAREA', 'LABEL'];
|
||||||
|
|
||||||
function navigate(url) {
|
function navigate(url) {
|
||||||
var mc = document.getElementById('main-content');
|
window.location.href = url;
|
||||||
if (mc && window.htmx) {
|
|
||||||
htmx.ajax('GET', url, { target: '#main-content', swap: 'innerHTML', pushUrl: url });
|
|
||||||
} else {
|
|
||||||
window.location.href = url;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('touchend', function (e) {
|
document.addEventListener('touchend', function (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user