mirror of
https://github.com/jcreek/PlannerGenerator.git
synced 2026-07-12 18:43:51 +00:00
chore(*): Remove console logs
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
async function printURLToPDF(url) {
|
async function printURLToPDF(url) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
console.log(response);
|
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`Failed to fetch data from ${url}`);
|
throw new Error(`Failed to fetch data from ${url}`);
|
||||||
@@ -16,12 +15,9 @@
|
|||||||
const element = document.createElement('div');
|
const element = document.createElement('div');
|
||||||
element.innerHTML = htmlContent;
|
element.innerHTML = htmlContent;
|
||||||
|
|
||||||
console.log(element.querySelector('.day-container'));
|
|
||||||
|
|
||||||
// pages => individual html blocks to print
|
// pages => individual html blocks to print
|
||||||
// select all elements marked with 'day-container' to be printed into PDF
|
// select all elements marked with 'day-container' to be printed into PDF
|
||||||
const pages = Array.from(element.querySelectorAll('.day-container'));
|
const pages = Array.from(element.querySelectorAll('.day-container'));
|
||||||
console.log(pages[0]);
|
|
||||||
const pdfOptions = {
|
const pdfOptions = {
|
||||||
margin: 0,
|
margin: 0,
|
||||||
filename: `planner-${year}.pdf`,
|
filename: `planner-${year}.pdf`,
|
||||||
|
|||||||
Reference in New Issue
Block a user