From 4b9f3c898b55ece9e9f154da611431c412dc36f4 Mon Sep 17 00:00:00 2001 From: quentinperou <67630351+quentinperou@users.noreply.github.com> Date: Fri, 21 Jul 2023 02:00:41 +0200 Subject: [PATCH] clean console log v2.5 --- download-history.js | 9 ++++----- upload-history.js | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/download-history.js b/download-history.js index 2eb868e..92084d0 100644 --- a/download-history.js +++ b/download-history.js @@ -3,8 +3,8 @@ const link_json = document.getElementById('download-history-json'); const link_txt = document.getElementById('download-history-txt'); // current channel -const channelInUrl = location.search.substring(1).split('=')[1].toLowerCase(); -console.log(channelInUrl); +const channelInUrl = location.search.substring(1).split('&')[0].split('=')[1].toLowerCase(); +// console.log(channelInUrl); link_json.addEventListener('click', function (e) { @@ -15,7 +15,7 @@ link_json.addEventListener('click', function (e) { // Create a blog object with the file content which you want to add to the file const file = new Blob([content], { type: 'text/plain' }); - + // Create a URL for the blog object and insert it into an anchor element const link = document.createElement("a"); // Add file content in the object URL @@ -31,7 +31,6 @@ link_json.addEventListener('click', function (e) { link_txt.addEventListener('click', function (e) { //get local storage data const content = localStorage.getItem("HgltCt-messagesSave-" + channelInUrl); - console.log( " test json"); const data = JSON.parse(content); @@ -40,7 +39,7 @@ link_txt.addEventListener('click', function (e) { // Create a blog object with the file content which you want to add to the file const file2 = new Blob([result], { type: 'text/plain' }); - + // Create a URL for the blog object and insert it into an anchor element const link = document.createElement("a"); // Add file content in the object URL diff --git a/upload-history.js b/upload-history.js index e1669d8..dbee8e7 100644 --- a/upload-history.js +++ b/upload-history.js @@ -17,7 +17,7 @@ upload_bt.addEventListener('click', function (e) { reader.onload = readerEvent => { const content = readerEvent.target.result; // this is the content! const data = JSON.parse(content); - console.log(data); + // console.log(data); const channelInUrl = location.search.substring(1).split('&')[0].split('=')[1].toLowerCase(); //check if channel is the same