[id,basedir,filename];
		}
	});
	return result;
}

function setTheme(themeName){
	setStorage("NotepadA_theme",themeName);
	theme = themeName;
	
	if (checkIfAllTabSaved() == false){
		//Ask the user if confirm close
		var confirmClose = confirm("Reloading NotepadA is required to apply the changes. Confirm?");
		if (confirmClose == false){
			return false;
		}
	}
	console.log("Updating theme to: " + themeName);
	//Reload all tabs with the corrispoding themes after changing theme settings
	reloadAllTabs();
}

