diff --git a/icons/logo128.png b/icons/logo128.png
new file mode 100644
index 0000000..3ae6aa4
Binary files /dev/null and b/icons/logo128.png differ
diff --git a/icons/logo16.png b/icons/logo16.png
new file mode 100644
index 0000000..2ce09d4
Binary files /dev/null and b/icons/logo16.png differ
diff --git a/icons/logo32.png b/icons/logo32.png
new file mode 100644
index 0000000..df04f3a
Binary files /dev/null and b/icons/logo32.png differ
diff --git a/icons/logo48.png b/icons/logo48.png
new file mode 100644
index 0000000..cffc6ac
Binary files /dev/null and b/icons/logo48.png differ
diff --git a/manifest.json b/manifest.json
index 787feb9..ea971ea 100644
--- a/manifest.json
+++ b/manifest.json
@@ -11,7 +11,19 @@
"keyword": "hb"
},
"action": {
- "default_popup": "popup.html"
+ "default_popup": "popup.html",
+ "default_icon": {
+ "16": "/icons/logo16.png",
+ "32": "/icons/logo32.png",
+ "48": "/icons/logo48.png",
+ "128": "/icons/logo128.png"
+ }
+ },
+ "icons": {
+ "16": "/icons/logo16.png",
+ "32": "/icons/logo32.png",
+ "48": "/icons/logo48.png",
+ "128": "/icons/logo128.png"
},
"author": "Hrishikesh Bawane"
}
\ No newline at end of file
diff --git a/popup.html b/popup.html
index 9a0ddf8..34abc5e 100644
--- a/popup.html
+++ b/popup.html
@@ -2,19 +2,34 @@
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
URL Alias Extension
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/popup.js b/popup.js
index b5c0e86..b4cf89e 100644
--- a/popup.js
+++ b/popup.js
@@ -8,24 +8,28 @@ window.onload = setPrevAliases;
document.getElementById("saveAlias").addEventListener("click", saveNewAlias);
+function saveNewAlias() {
+ var newAlias = document.getElementById("aliasInput").value;
+ var newUrl = document.getElementById("urlInput").value;
+ aliasToUrlMap[newAlias] = newUrl;
+ var aliasToURLParsed = JSON.stringify(aliasToUrlMap);
+ chrome.storage.sync.set({ aliasToURLParsed });
+ setPrevAliases();
+}
+
function setPrevAliases() {
chrome.storage.sync.get("aliasToURLParsed", ({aliasToURLParsed}) => {
aliasToUrlMap = JSON.parse(aliasToURLParsed);
- var displayStr = "";
+ var parentElem = document.getElementById("prevAliases");
+ parentElem.innerHTML = "";
for (var alias in aliasToUrlMap)
{
- displayStr += alias + ": " + aliasToUrlMap[alias];
- displayStr += "
";
+ var listTag = document.createElement("li");
+ listTag.className = "list-group-item";
+ var listText = document.createTextNode(alias + ": " + aliasToUrlMap[alias]);
+ listTag.appendChild(listText);
+ parentElem.appendChild(listTag);
}
- document.getElementById("prevAliases").innerHTML = displayStr;
+ //document.getElementById("prevAliases").innerHTML = displayStr;
});
}
-
-function saveNewAlias() {
- var newAlias = document.getElementById("aliasInput").value;
- var newUrl = document.getElementById("urlInput").value;
- aliasToUrlMap[newAlias] = newUrl;
- var aliasToURLParsed = JSON.stringify(aliasToUrlMap);
- chrome.storage.sync.set({ aliasToURLParsed });
- setPrevAliases();
-}
\ No newline at end of file
diff --git a/style.css b/style.css
index 2f90ca7..9c4a08d 100644
--- a/style.css
+++ b/style.css
@@ -3,15 +3,36 @@ button {
width: 100px;
margin: 10px;
background-color: lightgreen;
+ font-size: medium;
}
input {
height: 30px;
width: auto;
margin: 10px;
+ padding: 10px;
+ font-size: medium;
}
label {
font-weight: bold;
+ font-size: medium;
margin: 10px;
-}
\ No newline at end of file
+}
+
+h2, h5 {
+ margin: 10px;
+ font-weight: bold;
+}
+
+#contentArea, #inputArea {
+ background-color: whitesmoke;
+ padding: 10px;
+}
+
+#titleArea {
+ background-color: lightgrey;
+ padding: 10px;
+}
+
+