From af459aa93ad2436a8b2447d37623c7f3e0638b86 Mon Sep 17 00:00:00 2001 From: cutls Date: Thu, 12 Dec 2019 00:17:22 +0900 Subject: [PATCH] Fix: openFinder dialog --- app/js/platform/end.js | 2 +- app/js/ui/img.js | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/js/platform/end.js b/app/js/platform/end.js index f0d6cefd..5dbe5758 100644 --- a/app/js/platform/end.js +++ b/app/js/platform/end.js @@ -144,7 +144,7 @@ onmessage = function(e) { } else if (e.data[0] == 'toastSaved') { var show = `${lang.lang_img_DLDone}${ e.data[1][0] - }` + }` M.toast({ html: show, displayLength: 5000 }) } else if (e.data[0] == 'parseColumn') { parseColumn(e.data[1]) diff --git a/app/js/ui/img.js b/app/js/ui/img.js index 0ff1739e..cfecead7 100644 --- a/app/js/ui/img.js +++ b/app/js/ui/img.js @@ -95,7 +95,7 @@ function imageXhr(id, key, murl) { 'loadend', function(event) { var total = event.total - $('#imgbyte').text(Math.floor(total/1024)) + $('#imgbyte').text(Math.floor(total / 1024)) var now = event.loaded var per = (now / total) * 100 $('#imgprog').text(Math.floor(per)) @@ -266,9 +266,8 @@ function dlImg() { if (remote_img == 'yes') { murl = ourl } - if (localStorage.getItem('savefolder')) { - var save = localStorage.getItem('savefolder') - } else { + var save = localStorage.getItem('savefolder') + if (!save || save == 'null') { var save = '' } postMessage(['generalDL', [murl, save, false]], '*')