From b3220abdaddfd2ad3acd16009e9f40a5e9e1ab24 Mon Sep 17 00:00:00 2001 From: Kato Twofold Date: Sat, 21 May 2022 16:19:24 +0300 Subject: [PATCH] * Quick archives fix --- static/js/pad-scripts.js | 4 ++-- templates/pages/page.html | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/pad-scripts.js b/static/js/pad-scripts.js index 1fb819f..9b95aa8 100644 --- a/static/js/pad-scripts.js +++ b/static/js/pad-scripts.js @@ -71,7 +71,7 @@ function updateStatus(txt, cls) { function getLocalArchives() { - let a = localStorage.getItem("archives"); + let a = localStorage.getItem(`${padTitle}_archives`); // Check if we had anything in storage for the archives if ( a == null ) { @@ -96,7 +96,7 @@ function storeArchives(archives) { if ( !Array.isArray(archives) ) return; // Set the current archives - localStorage.setItem('archives', JSON.stringify(archives)); + localStorage.setItem(`${padTitle}_archives`, JSON.stringify(archives)); } function renderArchivesSelection() { diff --git a/templates/pages/page.html b/templates/pages/page.html index 7627642..5d51f0e 100644 --- a/templates/pages/page.html +++ b/templates/pages/page.html @@ -18,6 +18,7 @@