mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 21:00:57 +00:00
change weather_spec
This commit is contained in:
@@ -22,16 +22,14 @@ exports.stopApplication = function () {
|
||||
}
|
||||
};
|
||||
|
||||
exports.getDocument = function (callback, ms) {
|
||||
exports.getDocument = function (callback) {
|
||||
const url = "http://" + (config.address || "localhost") + ":" + (config.port || "8080");
|
||||
jsdom.JSDOM.fromURL(url, { resources: "usable", runScripts: "dangerously" }).then((dom) => {
|
||||
dom.window.name = "jsdom";
|
||||
dom.window.onload = function () {
|
||||
global.MutationObserver = dom.window.MutationObserver;
|
||||
global.document = dom.window.document;
|
||||
setTimeout(() => {
|
||||
callback();
|
||||
}, ms);
|
||||
callback();
|
||||
};
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user