From 2aee9dd4b2b9c52949286e4c7beaf10ad5f8002c Mon Sep 17 00:00:00 2001 From: fx4waldi Date: Sun, 16 Jul 2017 21:03:03 +0200 Subject: [PATCH] Version 1.1.1 - fixed bugs - removed unused file - minor changes --- _locales/en/messages.json | 3 --- _locales/pl/messages.json | 3 --- i18n.js | 9 --------- manifest.json | 2 +- shared.js | 2 +- sidebar.js | 18 ++++++++++++++++-- 6 files changed, 18 insertions(+), 19 deletions(-) delete mode 100644 i18n.js diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 4be76ec..a28f1bb 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -152,9 +152,6 @@ "notifications": { "message": "Notifications" }, - "save": { - "message": "Save" - }, "autoOpen": { "message": "Automatically open the changed pages" }, diff --git a/_locales/pl/messages.json b/_locales/pl/messages.json index b14e542..2b8c873 100644 --- a/_locales/pl/messages.json +++ b/_locales/pl/messages.json @@ -152,9 +152,6 @@ "notifications": { "message": "Powiadomienia" }, - "save": { - "message": "Zapisz" - }, "autoOpen": { "message": "Automatycznie otwieraj zmienione strony" }, diff --git a/i18n.js b/i18n.js deleted file mode 100644 index f940d12..0000000 --- a/i18n.js +++ /dev/null @@ -1,9 +0,0 @@ -(function(){ - const oBody = document.body.innerHTML.toString(); - const nBody = oBody.replace(/__MSG_(\w+)__/g,(match,s1)=>{ - return s1 ? browser.i18n.getMessage(s1) : ""; - }); - if(nBody!=oBody){ - document.body.innerHTML = nBody; - } -})(); \ No newline at end of file diff --git a/manifest.json b/manifest.json index 5fb12c2..d3ab3c1 100644 --- a/manifest.json +++ b/manifest.json @@ -46,7 +46,7 @@ "manifest_version": 2, "default_locale": "en", "name": "__MSG_extensionName__", - "version": "1.1.0", + "version": "1.1.1", "icons": { "48": "icons/icon.svg", "24": "icons/icon2.svg" diff --git a/shared.js b/shared.js index 1b12972..7f7a395 100644 --- a/shared.js +++ b/shared.js @@ -108,7 +108,7 @@ function scanSite(ev,auto=false,force=false){ }catch(e){ console.warn(e); } - if(!auto)statusbar(``,true); + if(!auto)statusbar([ix,len],true); }); if(!auto)statusbar(i18n("scanCompleted")); }).then((s)=>{ diff --git a/sidebar.js b/sidebar.js index bfdb098..9d64d3f 100644 --- a/sidebar.js +++ b/sidebar.js @@ -179,9 +179,23 @@ function hideAll(e){ } function statusbar(e,aHide){ - document.getElementById("statusbar").innerHTML=e; + let statusbar=document.getElementById("statusbar"); + if(typeof(e)==="string"){ + statusbar.textContent=e; + }else{ + let progress; + if(e[0]===0){ + statusbar.textContent=""; + progress=document.createElement('progress'); + progress.max=e[1]; + statusbar.appendChild(progress); + }else{ + progress=document.getElementsByTagName("progress")[0]; + } + progress.value=e[0]; + } if(!aHide){ - setTimeout(()=>{document.getElementById("statusbar").textContent="";},5000); + setTimeout(()=>{statusbar.textContent="";},5000); } }