From 89b78d075c79b74b83f6e79b5fcdce7d9476f6e8 Mon Sep 17 00:00:00 2001 From: Andrew Van Tassel Date: Sat, 7 Jan 2017 13:00:12 -0700 Subject: [PATCH] Fixed preferences display bar style update --- chrome/content/preferences.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/chrome/content/preferences.js b/chrome/content/preferences.js index 8d0aaa1..71d1f82 100644 --- a/chrome/content/preferences.js +++ b/chrome/content/preferences.js @@ -10,8 +10,9 @@ var mailHopPreferences = { fkey: '', //forecast.io api key country_filter: [], previewBar: null, - + loadPreferences: function(){ + var self = this; this.api_host = document.getElementById("mailhop.api_host"); @@ -90,13 +91,13 @@ var mailHopPreferences = { this.saveAPIKey(); document.getElementById("mailhop.bar_color").addEventListener("input", function () { - this.previewBar.style.background = this.value; + self.previewBar.style.background = this.value; }); document.getElementById("mailhop.font_color").addEventListener("input", function () { - this.previewBar.style.color = this.value; + self.previewBar.style.color = this.value; }); document.getElementById("mailhop.font_size").addEventListener("input", function () { - this.previewBar.style.fontSize = this.value; + self.previewBar.style.fontSize = this.value; }); }, savePreferences: function() {