From 6a37753753a3feeec30c5777e3e7f54d80738cb6 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 31 Dec 2019 02:32:44 -0500 Subject: [PATCH 1/5] Added defaults to option page. --- options/options.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/options/options.html b/options/options.html index 45983d58..24a40aa1 100644 --- a/options/options.html +++ b/options/options.html @@ -25,7 +25,7 @@
@@ -84,7 +84,7 @@
@@ -101,7 +101,7 @@
@@ -118,7 +118,7 @@
@@ -178,7 +178,7 @@
From c73b9ed5a6eeb2de1d0cd4cdc9315d70b92ddcae Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 6 Jan 2020 22:30:35 -0500 Subject: [PATCH 2/5] Remove redundant code. --- utils.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/utils.js b/utils.js index f739ce8d..caa002e5 100644 --- a/utils.js +++ b/utils.js @@ -55,13 +55,6 @@ function localizeHtmlPage() { let localizedMessage = getLocalizedMessage(obj.innerHTML.toString()); if (localizedMessage) obj.innerHTML = localizedMessage; - - // Try on each attribute - let attributes = obj.getAttributeNames(); - for (const attribute of attributes) { - localizedMessage = getLocalizedMessage(obj.getAttribute(attribute).toString()); - if (localizedMessage) obj.setAttribute(attribute) = localizedMessage; - } } } From 7acc6c3329931a59dc021c74f9f24af0fa6ba903 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Thu, 9 Jan 2020 15:00:03 -0500 Subject: [PATCH 3/5] Added warning message when changing the userID. --- options/options.html | 2 +- options/options.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/options/options.html b/options/options.html index 67a46897..2a763436 100644 --- a/options/options.html +++ b/options/options.html @@ -150,7 +150,7 @@

-
+
__MSG_changeUserID__
diff --git a/options/options.js b/options/options.js index 14ed32ad..82e9a2af 100644 --- a/options/options.js +++ b/options/options.js @@ -118,7 +118,13 @@ function activateTextChange(element) { textBox.value = SB.config[option]; let setButton = element.querySelector(".text-change-set"); - setButton.addEventListener("click", () => {SB.config[option] = textBox.value}); + setButton.addEventListener("click", () => { + let confirmMessage = element.getAttribute("confirm-message"); + + if (confirmMessage === null || confirm(chrome.i18n.getMessage(confirmMessage))) { + SB.config[option] = textBox.value; + } + }); element.querySelector(".option-hidden-section").classList.remove("hidden"); } From 1c3e2fcdad562249c118ced5bf80e05521bd7f98 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Thu, 9 Jan 2020 15:01:42 -0500 Subject: [PATCH 4/5] Fixed help page style issue. --- help/styles.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/help/styles.css b/help/styles.css index 338f1810..278d8c72 100644 --- a/help/styles.css +++ b/help/styles.css @@ -83,6 +83,12 @@ vertical-align: middle; } +.profilepiccircle { + vertical-align: middle; + overflow: hidden; + border-radius: 50%; +} + a { text-decoration: underline; color: inherit; From c40b6576d6138cb1add08eed30865cb3f680b1c2 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Thu, 9 Jan 2020 15:02:06 -0500 Subject: [PATCH 5/5] Updated gitignore. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index fe41ed0a..4ff2c144 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ ignored .idea/ node_modules web-ext-artifacts +.vscode/