From 1567efe6b368b49ae2d191b0fae7d6a89b9d08c1 Mon Sep 17 00:00:00 2001 From: ynasser Date: Fri, 28 Apr 2017 22:24:30 -0700 Subject: [PATCH 1/7] adding a version number to the popup --- src/js/popup.js | 9 +++++++++ src/manifest.json | 3 ++- src/skin/popup.css | 4 ++++ src/skin/popup.html | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/js/popup.js b/src/js/popup.js index 820ff7d375..bd529f6e34 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -23,6 +23,7 @@ var require = backgroundPage.require; var constants = backgroundPage.constants; var badger = backgroundPage.badger; var htmlUtils = require("htmlutils").htmlUtils; +var utils = require("utils"); var i18n = chrome.i18n; var reloadTab = chrome.tabs.reload; @@ -103,6 +104,14 @@ function init() { $("#deactivate_site_btn").hide(); } }); + utils.xhrRequest("manifest.json", function(err, response){ + if(err){ + console.error('Problem loading manifest.json:', err.status, err.message); + return; + } + response = JSON.parse(response); + $("#version_number").text("v" + response["display_version"]); + }); } $(init); diff --git a/src/manifest.json b/src/manifest.json index d06c5d2d9a..258925b564 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -93,5 +93,6 @@ "web_accessible_resources": [ "skin/*", "icons/*" - ] + ], + "display_version": "2.0.0" } diff --git a/src/skin/popup.css b/src/skin/popup.css index ba8bc757a6..5a3811ef0f 100644 --- a/src/skin/popup.css +++ b/src/skin/popup.css @@ -378,3 +378,7 @@ font-size: 16px; #siteControls button { font-size: 12px; } + +#version_number{ + color: #ec9329; +} diff --git a/src/skin/popup.html b/src/skin/popup.html index 6a34785445..b93330b7da 100644 --- a/src/skin/popup.html +++ b/src/skin/popup.html @@ -64,7 +64,7 @@

-

+

From 09c4343810ab74c6fbf9fe5bdb397c4b9299a393 Mon Sep 17 00:00:00 2001 From: ynasser Date: Fri, 28 Apr 2017 22:37:21 -0700 Subject: [PATCH 2/7] lint --- src/js/popup.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/popup.js b/src/js/popup.js index bd529f6e34..6fa8d1d047 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -106,11 +106,11 @@ function init() { }); utils.xhrRequest("manifest.json", function(err, response){ if(err){ - console.error('Problem loading manifest.json:', err.status, err.message); - return; + console.error('Problem loading manifest.json:', err.status, err.message); + return; } response = JSON.parse(response); - $("#version_number").text("v" + response["display_version"]); + $("#version_number").text("v" + response.display_version); }); } $(init); From e492e503ca27ae162240552321e9e891cb48dfd9 Mon Sep 17 00:00:00 2001 From: ynasser Date: Sun, 30 Apr 2017 15:52:58 -0700 Subject: [PATCH 3/7] addressing feedback --- src/_locales/en_US/messages.json | 4 +++- src/js/popup.js | 12 ++++-------- src/manifest.json | 1 - src/skin/popup.css | 4 ++-- src/skin/popup.html | 3 ++- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/_locales/en_US/messages.json b/src/_locales/en_US/messages.json index 33febe9da9..00c5ad6962 100644 --- a/src/_locales/en_US/messages.json +++ b/src/_locales/en_US/messages.json @@ -295,6 +295,8 @@ }, "donate_to_eff": { "message": "Donate to EFF" + }, + "version": { + "message": "version" } - } diff --git a/src/js/popup.js b/src/js/popup.js index 6fa8d1d047..518d30a39a 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -104,14 +104,10 @@ function init() { $("#deactivate_site_btn").hide(); } }); - utils.xhrRequest("manifest.json", function(err, response){ - if(err){ - console.error('Problem loading manifest.json:', err.status, err.message); - return; - } - response = JSON.parse(response); - $("#version_number").text("v" + response.display_version); - }); + + manifest = chrome.runtime.getManifest(); + version = i18n.getMessage("version") + " " + manifest["version"]; + $("#version").text(version); } $(init); diff --git a/src/manifest.json b/src/manifest.json index 258925b564..ccf4d1e30f 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -94,5 +94,4 @@ "skin/*", "icons/*" ], - "display_version": "2.0.0" } diff --git a/src/skin/popup.css b/src/skin/popup.css index 5a3811ef0f..15a14d0a21 100644 --- a/src/skin/popup.css +++ b/src/skin/popup.css @@ -379,6 +379,6 @@ font-size: 16px; font-size: 12px; } -#version_number{ - color: #ec9329; +#version{ + color: #707070; } diff --git a/src/skin/popup.html b/src/skin/popup.html index b93330b7da..b6a914f2a0 100644 --- a/src/skin/popup.html +++ b/src/skin/popup.html @@ -64,7 +64,7 @@

-

+

@@ -80,5 +80,6 @@

+ From e4f27e63075d7ccac2b250bfded01cdb40d9c701 Mon Sep 17 00:00:00 2001 From: ynasser Date: Sun, 30 Apr 2017 16:01:10 -0700 Subject: [PATCH 4/7] lint --- src/js/popup.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/js/popup.js b/src/js/popup.js index 518d30a39a..d58b3d725f 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -23,7 +23,6 @@ var require = backgroundPage.require; var constants = backgroundPage.constants; var badger = backgroundPage.badger; var htmlUtils = require("htmlutils").htmlUtils; -var utils = require("utils"); var i18n = chrome.i18n; var reloadTab = chrome.tabs.reload; @@ -105,8 +104,7 @@ function init() { } }); - manifest = chrome.runtime.getManifest(); - version = i18n.getMessage("version") + " " + manifest["version"]; + var version = i18n.getMessage("version") + " " + chrome.runtime.getManifest().version; $("#version").text(version); } $(init); From e5dcd7ab8f97fcd6765eadd0d4e92690e2cd35e8 Mon Sep 17 00:00:00 2001 From: ynasser Date: Mon, 1 May 2017 14:03:54 -0700 Subject: [PATCH 5/7] addressing some PR feedback --- src/manifest.json | 2 +- src/skin/popup.css | 6 ++++-- src/skin/popup.html | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/manifest.json b/src/manifest.json index ccf4d1e30f..d06c5d2d9a 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -93,5 +93,5 @@ "web_accessible_resources": [ "skin/*", "icons/*" - ], + ] } diff --git a/src/skin/popup.css b/src/skin/popup.css index 15a14d0a21..c5035d0a5d 100644 --- a/src/skin/popup.css +++ b/src/skin/popup.css @@ -164,10 +164,10 @@ color: #505050; font-size: 16px; } #privacyBadgerHeader h2{ - margin: 10px; + margin: 5px; float: left; color: #707070; - font-size: 26px; + font-size: 24px; font-weight: normal; font-family: helvetica, arial, 'Lucida Grande', 'Segoe UI', Tahoma, 'DejaVu Sans', sans-serif;; } @@ -380,5 +380,7 @@ font-size: 16px; } #version{ + padding-left: 55px; color: #707070; + font-size: 10px; } diff --git a/src/skin/popup.html b/src/skin/popup.html index b6a914f2a0..107b8e920b 100644 --- a/src/skin/popup.html +++ b/src/skin/popup.html @@ -66,6 +66,7 @@

+

@@ -80,6 +81,5 @@

- From 664bcf910adc6181b3ae180e7cb49a2a25a6057f Mon Sep 17 00:00:00 2001 From: ynasser Date: Mon, 1 May 2017 21:38:30 -0700 Subject: [PATCH 6/7] actually moving version text to the right spot --- src/skin/popup.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/skin/popup.css b/src/skin/popup.css index c5035d0a5d..172b3d4463 100644 --- a/src/skin/popup.css +++ b/src/skin/popup.css @@ -284,6 +284,7 @@ font-size: 16px; #pbInstructions{ color: #505050; font-size: 16px; + padding-top: 10px; margin: 0; } @@ -380,6 +381,8 @@ font-size: 16px; } #version{ + float: left; + margin-top: -15px; padding-left: 55px; color: #707070; font-size: 10px; From 33a881b5009a89ee6fa92ddc59d626268f8c64d7 Mon Sep 17 00:00:00 2001 From: ynasser Date: Tue, 2 May 2017 14:09:40 -0700 Subject: [PATCH 7/7] moving title + subtitle 5px to the right --- src/skin/popup.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/skin/popup.css b/src/skin/popup.css index 172b3d4463..b9bf14ed3d 100644 --- a/src/skin/popup.css +++ b/src/skin/popup.css @@ -165,6 +165,7 @@ font-size: 16px; } #privacyBadgerHeader h2{ margin: 5px; + padding-left: 5px; float: left; color: #707070; font-size: 24px; @@ -383,7 +384,7 @@ font-size: 16px; #version{ float: left; margin-top: -15px; - padding-left: 55px; + padding-left: 60px; color: #707070; font-size: 10px; }