From db540c479242de00bb60a42d209b15b4bdcc9712 Mon Sep 17 00:00:00 2001 From: Tracker-Friendly Date: Wed, 14 Feb 2024 18:03:31 +0000 Subject: [PATCH] Testing usage function --- static/js/main.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/static/js/main.js b/static/js/main.js index fb476e4..8983fb9 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -573,6 +573,18 @@ function exportNotes() { }) } +function isFirstTimeVisitor() { + if (document.cookie.indexOf("visited=true") !== -1) { + return false; + } else { + var expirationDate = new Date(); + expirationDate.setFullYear(expirationDate.getFullYear() + 1); + document.cookie = "visited=true; expires=" + expirationDate.toUTCStrin> + return true; + } +} + + exportNotesButton.addEventListener("click", (event) => { exportNotesButton.innerText = "Downloading..." exportNotes() @@ -601,3 +613,5 @@ removeBox.addEventListener("click", (event) => { }) } }); + +displayError("To use PageBurger:\nSwipe Right on a note to open it\nSwipe left in the text boxes to return to notes\nClick on a note to highlight it")