mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-29 04:29:41 +00:00
update: spaces -> tabs
This commit is contained in:
parent
205de7233e
commit
a35e8f3315
@ -40,7 +40,7 @@ Module.register("compliments", {
|
||||
afternoonEndTime: 17,
|
||||
random: true,
|
||||
mockDate: null,
|
||||
advice: false
|
||||
advice: false
|
||||
},
|
||||
lastIndexUsed:-1,
|
||||
// Set currentweather from module
|
||||
@ -64,18 +64,18 @@ Module.register("compliments", {
|
||||
self.updateDom();
|
||||
});
|
||||
} else if (this.config.advice) {
|
||||
var xobj = new XMLHttpRequest();
|
||||
var xobj = new XMLHttpRequest();
|
||||
xobj.overrideMimeType("application/json");
|
||||
xobj.open("GET", "https://api.adviceslip.com/advice", true);
|
||||
xobj.onreadystatechange = function() {
|
||||
if (xobj.readyState === 4 && xobj.status === 200) {
|
||||
const adviceResp = JSON.parse(xobj.responseText);
|
||||
self.config.compliments = adviceResp.slip.advice
|
||||
self.updateDom();
|
||||
}
|
||||
};
|
||||
xobj.send(null);
|
||||
}
|
||||
xobj.open("GET", "https://api.adviceslip.com/advice", true);
|
||||
xobj.onreadystatechange = function() {
|
||||
if (xobj.readyState === 4 && xobj.status === 200) {
|
||||
const adviceResp = JSON.parse(xobj.responseText);
|
||||
self.config.compliments = adviceResp.slip.advice
|
||||
self.updateDom();
|
||||
}
|
||||
};
|
||||
xobj.send(null);
|
||||
}
|
||||
|
||||
// Schedule update timer.
|
||||
setInterval(function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user