diff --git a/content/preferences.html b/content/preferences.html index 2b73368..4f5bf88 100644 --- a/content/preferences.html +++ b/content/preferences.html @@ -136,6 +136,22 @@

Flag messages as junk if travel time takes longer than normal.

+
+
+ +
+ + +
+
+
+
+ + +
+
+

Show additional information in authentication results, typically contains more header content.

+
diff --git a/js/mailhops.js b/js/mailhops.js index 4d2508d..66f52aa 100644 --- a/js/mailhops.js +++ b/js/mailhops.js @@ -18,8 +18,9 @@ class MailHops { theme: 'light', api_http: 'https://', api_host: 'api.Mailhops.com', - debug: false, travel_time_junk: false, + extrainfo: false, + debug: false, country_filter: [] } message = { @@ -68,6 +69,9 @@ class MailHops { if (data.travel_time_junk && data.travel_time_junk != 'off') { this.options.travel_time_junk = Boolean(data.travel_time_junk); } + if (data.extrainfo) { + this.options.extrainfo = Boolean(data.extrainfo); + } if (data.debug) { this.options.debug = Boolean(data.debug); } diff --git a/js/preferences.js b/js/preferences.js index daaae14..ab542ed 100644 --- a/js/preferences.js +++ b/js/preferences.js @@ -3,8 +3,9 @@ const MailHopPreferences = { valid_api_key: false, unit: 'mi', theme: 'light', - debug: false, travel_time_junk: false, + extrainfo: false, + debug: false, owm_key: '', //OpenWeatherMap.org api key countries: [], @@ -78,6 +79,7 @@ const MailHopPreferences = { this.theme = data.theme || 'light'; this.unit = data.unit || 'mi'; this.travel_time_junk = Boolean(data.travel_time_junk); + this.extrainfo = Boolean(data.extrainfo); this.debug = Boolean(data.debug); if (data.countries) { @@ -123,6 +125,11 @@ const MailHopPreferences = { else document.getElementById("travel_time_junk_off").setAttribute('checked', 'checked'); + if (this.extrainfo) + document.getElementById("extrainfo_on").setAttribute('checked', 'checked'); + else + document.getElementById("extrainfo_off").setAttribute('checked', 'checked'); + if (this.debug) document.getElementById("debug_on").setAttribute('checked', 'checked'); else @@ -209,6 +216,7 @@ const MailHopPreferences = { unit: document.querySelector('input[name="unit"]:checked').value, theme: document.querySelector('input[name="theme"]:checked').value, travel_time_junk: document.querySelector('input[name="travel_time_junk"]:checked').value == 'on' ? true : false, + extrainfo: document.querySelector('input[name="extrainfo"]:checked').value == 'on' ? true : false, debug: document.querySelector('input[name="debug"]:checked').value == 'on' ? true : false, countries: self.countries.join(','), }); @@ -318,4 +326,4 @@ const MailHopPreferences = { }; -MailHopPreferences.init(); \ No newline at end of file +MailHopPreferences.init();