print: add option to print whole chapter

This commit is contained in:
Sören Weber 2022-04-02 15:29:34 +02:00
parent 70b4143327
commit 0dd92e332b
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589
53 changed files with 454 additions and 71 deletions
static/js

View file

@ -7,6 +7,8 @@ if( isIE ){
else{
document.querySelector( 'body' ).classList.add( 'mobile-support' );
}
var isPrint = document.querySelector( 'body' ).classList.contains( 'print' );
var touchsupport = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)
var formelements = 'button, datalist, fieldset, input, label, legend, meter, optgroup, option, output, progress, select, textarea';
@ -295,6 +297,10 @@ function initArrowNav(){
}
function initMenuScrollbar(){
if( isPrint ){
return;
}
var content = '#body-inner';
if( isIE ){
// IE can not display the topbar as sticky; so we let