mirror of
https://github.com/MailHops/mailhops-plugin.git
synced 2025-05-16 06:10:08 -07:00
Fixed km option
This commit is contained in:
parent
91fba87ab9
commit
060979276c
BIN
images/openweathermap.png
Normal file
BIN
images/openweathermap.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
2
js/bootstrap.js
vendored
2
js/bootstrap.js
vendored
@ -35,7 +35,7 @@ function connected(p) {
|
||||
"message": MailHops.message,
|
||||
"response": MailHops.response,
|
||||
"meta": MailHops.meta,
|
||||
"unit": MailHops.unit
|
||||
"options": MailHops.options
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ function updateContent(msg) {
|
||||
|
||||
const route = msg.response.route || [];
|
||||
const sender = msg.message.sender || null;
|
||||
const unit = msg.unit || "mi";
|
||||
const unit = msg.options.unit || "mi";
|
||||
let client = null;
|
||||
let items = [];
|
||||
|
||||
|
@ -40,15 +40,15 @@ var mailHopPreferences = {
|
||||
getting.then(data => {
|
||||
if (data.api_key) {
|
||||
self.api_key.value = data.api_key;
|
||||
document.getElementById("join-link").innerHTML = 'My Account';
|
||||
document.getElementById("join-link").innerHTML = 'My Account and Dashboard';
|
||||
document.getElementById("join-link").setAttribute('href', 'https://mailhops.com/account/' + data.api_key);
|
||||
this.saveAPIKey(true);
|
||||
}
|
||||
if (data.owm_key) {
|
||||
self.owm_key.value = data.owm_key;
|
||||
}
|
||||
if (data.distinace_unit) {
|
||||
if (data.distinace_unit == "mi")
|
||||
if (data.unit) {
|
||||
if (data.unit == "mi")
|
||||
document.getElementById("unit_mi").setAttribute('checked', 'checked');
|
||||
else
|
||||
document.getElementById("unit_km").setAttribute('checked', 'checked');
|
||||
@ -117,7 +117,7 @@ var mailHopPreferences = {
|
||||
else
|
||||
document.getElementById("rate-reset").innerHTML = "Resets in: " + Math.round(data.account.rate.reset / 60 / 60) + " hr.";
|
||||
|
||||
document.getElementById("join-link").innerHTML = 'My Account';
|
||||
document.getElementById("join-link").innerHTML = 'My Account and Dashboard';
|
||||
document.getElementById("join-link").setAttribute('href','https://mailhops.com/account/'+api_key);
|
||||
|
||||
} else if (xmlhttp.status === 401) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
"manifest_version": 2,
|
||||
"name": "__MSG_appName__",
|
||||
"description": "__MSG_appDesc__",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.3",
|
||||
"author": "Hopsware LLC",
|
||||
"developer": {
|
||||
"name": "Andrew Van Tassel",
|
||||
|
Loading…
x
Reference in New Issue
Block a user