From c1d8d6c29f885978fdb5f4adac3515606d100434 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 18:22:47 -0400
Subject: Generate HTML output
---
 chrome-get-urls-from-tabs-in-windows.js | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)
(limited to 'chrome-get-urls-from-tabs-in-windows.js')
diff --git a/chrome-get-urls-from-tabs-in-windows.js b/chrome-get-urls-from-tabs-in-windows.js
index 7d0faad..aefab19 100644
--- a/chrome-get-urls-from-tabs-in-windows.js
+++ b/chrome-get-urls-from-tabs-in-windows.js
@@ -26,19 +26,35 @@ chrome.windows.getAll({populate:true}, function(windows){
 			});
 		}
 		else if (format === 'html') {
+			textarea.value += '\n\
+\n\
+
\n\
+	\n';
+
+			textarea.value += '	Chrome Copy URLs From All Tabs\n';
+
+			textarea.value += '\n\
+\n\
+	\n';
+			
 			windows.forEach(function(window){
-				textarea.value += "Window " + w_index + ":";
+				textarea.value += "		
Window " + w_index + ":
\n\n";
+				textarea.value += "		
\n";
 				
 				window.tabs.forEach(function(tab){
-					textarea.value += "\n";
-					textarea.value += "\t* " + tab.title + "\n";
-					textarea.value += "\t  " + tab.url + "\n";
+					textarea.value += "			- \n"
+					textarea.value += "				" + tab.title + "\n";
+					textarea.value += "			
 \n"
 				});
 		
-				textarea.value += "\n\n";
+				textarea.value += "		
\n";
 		
 				w_index++;
 			});
+			
+			textarea.value += '	
 \n\
+\n\
+';
 		}
 		else { // format === 'text'
 			windows.forEach(function(window){
-- 
cgit v1.2.3