aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2018-04-17 13:55:20 +0200
committerRahiel Kasim <rahielkasim@gmail.com>2018-04-17 13:55:20 +0200
commit680797fedfc10fe9609bd5b3b839aaad40877dd9 (patch)
treee80a5a1468af27f62c11606737107f6302cd5a22
parentcf162288dea28f027cc83f7a3820bcf629cbba27 (diff)
show extension name and version in popup, style popup
-rw-r--r--src/manifest.json4
-rw-r--r--src/popup.css18
-rw-r--r--src/popup.html4
-rw-r--r--src/popup.js9
4 files changed, 32 insertions, 3 deletions
diff --git a/src/manifest.json b/src/manifest.json
index b3bcc39..b6238b9 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -2,6 +2,7 @@
"name": "Archiveror",
"author": "Rahiel Kasim",
"description": "Archive webpages on archive.is, archive.org and more or on your own computer in MHTML format. Automatically archive your bookmarks.",
+ "homepage_url": "https://github.com/rahiel/archiveror",
"version": "0.8",
"applications": {
"gecko": {
@@ -40,7 +41,8 @@
"38": "icon-38.png"
},
"default_title": "Archiveror",
- "default_popup": "popup.html"
+ "default_popup": "popup.html",
+ "browser_style": true
},
"options_ui": {
diff --git a/src/popup.css b/src/popup.css
index 9a62f54..98c2c3a 100644
--- a/src/popup.css
+++ b/src/popup.css
@@ -1,3 +1,7 @@
+body {
+ margin: 8px;
+}
+
button {
color: #fff;
background-color: #337ab7;
@@ -5,8 +9,9 @@ button {
border-radius: 4px;
padding: 6px 12px;
margin: 5px 3px;
- width: 100%;
+ width: 95%;
text-align: center;
+ font-size: 14px;
}
button:hover {
@@ -23,8 +28,17 @@ a {
text-decoration: none;
}
a:hover { text-decoration: underline; }
-a:visited { color: #609; }
#bookmarkSection, #local {
display: none;
}
+
+footer {
+ color: #555;
+ font-size: 10px;
+ text-align: center;
+ margin-top: 7px;
+}
+footer > a {
+ color: #555;
+}
diff --git a/src/popup.html b/src/popup.html
index f486a24..ef11ac2 100644
--- a/src/popup.html
+++ b/src/popup.html
@@ -26,6 +26,10 @@
</ul>
</div>
+ <footer>
+ <a>Archiveror <span id="version"></span></a>
+ </footer>
+
<script src="popup.js"></script>
</body>
</html>
diff --git a/src/popup.js b/src/popup.js
index a418b57..ac60f4a 100644
--- a/src/popup.js
+++ b/src/popup.js
@@ -79,3 +79,12 @@ function showElements() {
});
}
showElements();
+
+function showVersion() {
+ const manifest = chrome.runtime.getManifest();
+ const version = manifest.version;
+ const url = manifest.homepage_url;
+ document.getElementById("version").textContent = version;
+ document.getElementsByTagName("footer")[0].onclick = function () { chrome.tabs.create({url: url}); };
+}
+showVersion();