Added empty session alerts where needed.
This commit is contained in:
		@@ -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,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": {
 | 
			
		||||
 
 | 
			
		||||
@@ -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); }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user