From 1890095df9a4a41064d9e6295371a082b1c4ab7f Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Sat, 31 Jul 2021 19:18:54 -0400 Subject: [PATCH] Fix bug with loading data from cookies Bit of groundwork for an actual reset button --- flaskr/templates/writing.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flaskr/templates/writing.html b/flaskr/templates/writing.html index afb4b8c..0b20751 100644 --- a/flaskr/templates/writing.html +++ b/flaskr/templates/writing.html @@ -25,8 +25,9 @@ window.scrollTo(0, document.body.scrollHeight); {% endif %} - if (document.getElementById('company').value === "BananaCorp") { - return + if (window.location.search.includes("reset=true")) { + window.history.pushState({},document.title,window.location.pathname); + return; } cookies = [