Skip to content

Commit

Permalink
clean console log v2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinperou committed Jul 21, 2023
1 parent af68bc8 commit 4b9f3c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions download-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand All @@ -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);

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion upload-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4b9f3c8

Please sign in to comment.