update: spaces -> tabs

This commit is contained in:
ndo@ndo3 2020-05-14 15:00:09 +02:00
parent 205de7233e
commit a35e8f3315

View File

@ -40,7 +40,7 @@ Module.register("compliments", {
afternoonEndTime: 17, afternoonEndTime: 17,
random: true, random: true,
mockDate: null, mockDate: null,
advice: false advice: false
}, },
lastIndexUsed:-1, lastIndexUsed:-1,
// Set currentweather from module // Set currentweather from module
@ -64,18 +64,18 @@ Module.register("compliments", {
self.updateDom(); self.updateDom();
}); });
} else if (this.config.advice) { } else if (this.config.advice) {
var xobj = new XMLHttpRequest(); var xobj = new XMLHttpRequest();
xobj.overrideMimeType("application/json"); xobj.overrideMimeType("application/json");
xobj.open("GET", "https://api.adviceslip.com/advice", true); xobj.open("GET", "https://api.adviceslip.com/advice", true);
xobj.onreadystatechange = function() { xobj.onreadystatechange = function() {
if (xobj.readyState === 4 && xobj.status === 200) { if (xobj.readyState === 4 && xobj.status === 200) {
const adviceResp = JSON.parse(xobj.responseText); const adviceResp = JSON.parse(xobj.responseText);
self.config.compliments = adviceResp.slip.advice self.config.compliments = adviceResp.slip.advice
self.updateDom(); self.updateDom();
} }
}; };
xobj.send(null); xobj.send(null);
} }
// Schedule update timer. // Schedule update timer.
setInterval(function() { setInterval(function() {