diff --git a/CHANGELOG.md b/CHANGELOG.md index fa58f016..88f00125 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ ## Release 0.9.9.4 (beta) * ENHANCEMENT: Experimental support for printing articles * ENHANCEMENT: Print zoom capability -* ENHANCEMENT: Prevent prevent printing of location pins +* ENHANCEMENT: Prevent printing of location pins +* ENHANCEMENT: Set maximum page width to 100% before printing * ENHANCEMENT: Better presentation of About and Changelog information * WORKAROUND: MW-Offliner bug which places extraneous tags in some HTML id attributes diff --git a/www/js/app.js b/www/js/app.js index 7221feb5..eb60e7fa 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -170,6 +170,13 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module' document.getElementById("printImageCheck").checked = false; document.getElementById("printImageCheck").disabled = true; } + //Remove max page-width restriction + if (params.removePageMaxWidth !== true) { + var tempPageMaxWidth = params.removePageMaxWidth; + params.removePageMaxWidth = true; + removePageMaxWidth(); + params.removePageMaxWidth = tempPageMaxWidth; + } var modalContent = document.getElementById("modal-content"); modalContent.classList.remove('dark'); if (params.cssUITheme != "light") modalContent.classList.add('dark'); @@ -179,7 +186,12 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module' }); $("#printModal").off('hide.bs.modal'); $("#printModal").on('hide.bs.modal', function() { - if (document.activeElement.id != "confirm-print-continue") { setTab(); return; } + if (document.activeElement.id != "confirm-print-continue") { //User cancelled + //Restore PageMaxWidth + removePageMaxWidth(); + setTab(); + return; + } uiUtil.printCustomElements(); //innerDocument.execCommand("print", false, null); window.frames[0].frameElement.contentWindow.print();