Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions src/assets/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,23 @@
var today_pretty = new Date().toDateString();

var mywindow = window.open("", "new div", "height=800,width=800");
mywindow.document.write("<html><head><title>Sermon Notes</title>");
var mywindowHTML = "<html><head><title>Sermon Notes</title>";
/* optional stylesheet */
mywindow.document.write(
'<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css">'
);
mywindow.document.write(
'</head><body><div class="container mt-3">'
);
mywindow.document.write("<h1>" + title + "</h1>");
mywindow.document.write("<h2>" + today_pretty + "</h2><hr>");
mywindow.document.write($(notes_text).html());
mywindow.document.write("</div></body></html>");
mywindowHTML += '<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css">';
mywindowHTML += '</head><body><div class="container mt-3">';
mywindowHTML += "<h1>" + title + "</h1>";
mywindowHTML += "<h2>" + today_pretty + "</h2><hr>";
mywindowHTML += $(notes_text).html();
mywindowHTML += "</div></body></html>";

mywindow.document.body.innerHTML = mywindowHTML;

setTimeout(function() {
mywindow.print();
mywindow.close();
}, 50);
setTimeout(function() {
mywindow.close();
}, 1000);
}, 500);

return true;
}
Expand Down