chore(print): clean up some logs

This commit is contained in:
Elian Doran
2025-10-19 16:35:13 +03:00
parent 64576458b7
commit 76c337602b
2 changed files with 5 additions and 9 deletions

View File

@@ -302,13 +302,11 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
iframe.className = "print-iframe";
document.body.appendChild(iframe);
iframe.onload = () => {
console.log("Got ", iframe, iframe.contentWindow);
if (iframe.contentWindow) {
iframe.contentWindow.addEventListener("note-ready", () => {
iframe.contentWindow?.print();
document.body.removeChild(iframe);
});
}
if (!iframe.contentWindow) return;
iframe.contentWindow.addEventListener("note-ready", () => {
iframe.contentWindow?.print();
document.body.removeChild(iframe);
});
};
}