mirror of
https://github.com/zadam/trilium.git
synced 2025-10-28 08:46:43 +01:00
chore(print): clean up some logs
This commit is contained in:
@@ -302,13 +302,11 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
|
|||||||
iframe.className = "print-iframe";
|
iframe.className = "print-iframe";
|
||||||
document.body.appendChild(iframe);
|
document.body.appendChild(iframe);
|
||||||
iframe.onload = () => {
|
iframe.onload = () => {
|
||||||
console.log("Got ", iframe, iframe.contentWindow);
|
if (!iframe.contentWindow) return;
|
||||||
if (iframe.contentWindow) {
|
|
||||||
iframe.contentWindow.addEventListener("note-ready", () => {
|
iframe.contentWindow.addEventListener("note-ready", () => {
|
||||||
iframe.contentWindow?.print();
|
iframe.contentWindow?.print();
|
||||||
document.body.removeChild(iframe);
|
document.body.removeChild(iframe);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ type View = "desktop" | "mobile" | "print";
|
|||||||
|
|
||||||
function index(req: Request, res: Response) {
|
function index(req: Request, res: Response) {
|
||||||
const view = getView(req);
|
const view = getView(req);
|
||||||
console.log("Got view ", view);
|
|
||||||
const options = optionService.getOptionMap();
|
const options = optionService.getOptionMap();
|
||||||
|
|
||||||
//'overwrite' set to false (default) => the existing token will be re-used and validated
|
//'overwrite' set to false (default) => the existing token will be re-used and validated
|
||||||
@@ -68,7 +67,6 @@ function index(req: Request, res: Response) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getView(req: Request): View {
|
function getView(req: Request): View {
|
||||||
console.log("Got ", req.query);
|
|
||||||
// Special override for printing.
|
// Special override for printing.
|
||||||
if ("print" in req.query) {
|
if ("print" in req.query) {
|
||||||
return "print";
|
return "print";
|
||||||
|
|||||||
Reference in New Issue
Block a user