diff --git a/README.md b/README.md index 3d00479..57a1739 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,8 @@ Easy Session Manager allows you to manage your Firefox session by backing up or # Download https://addons.mozilla.org/en-US/firefox/addon/easy-session-manager/ -# Version: 0.2.1.0 -Fixed edit logic when renaming session overwrites another session with the same name. -Split helper logic to utils.js. +# Version: 0.2.1.1 +Added alert when session is empty and trying to load it.... # Images ![1 Default interface with no sessions. ](images/pic1.png) diff --git a/src/manifest.json b/src/manifest.json index 46127f7..15f5356 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": " Easy Session Manager", - "version": "0.2.1.0", + "version": "0.2.1.1", "description": " Easy Session Manager allows you to manage your Firefox session by backing up or loading your saved sessions.", "applications": { diff --git a/src/scripts/sessionManager.js b/src/scripts/sessionManager.js index f035c52..aaf8e24 100644 --- a/src/scripts/sessionManager.js +++ b/src/scripts/sessionManager.js @@ -194,6 +194,13 @@ const loadSession = (json = null, replaceTabs = false) => { let wasCurrentTabId = null; if (replaceTabs) { // Clear all windows but main then load... + if (keysLength == 0) { + swal("Canceled operation; no tabs in session...", { + icon: "error", + }); + return ; + } + for (let i = 0; i < windows.length; i++) { if (currentWindow.id != windows[i].id) { windowSys.remove(windows[i].id); @@ -222,11 +229,14 @@ const loadSession = (json = null, replaceTabs = false) => { windowMaker(1, keysLength, keys, json) } } else { // Load into new windows... - if (keysLength > 0) { + if (keysLength == 1) { windowMaker(0, keysLength, keys, json) + } else if (keysLength == 0) { + swal("Canceled operation; no tabs in session...", { + icon: "error", + }); } } - }); }); } catch (e) { console.log(e); }