mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 21:00:57 +00:00
Cleanup compliments module (#2965)
Lots of small fixes and cleanups: - only render something when there is a compliment - cleanup naming - use es6 notations - use fetch instead of XMLHttpRequest in compliments Co-authored-by: veeck <michael@veeck.de> Co-authored-by: Karsten Hassel <hassel@gmx.de>
This commit is contained in:
@@ -35,6 +35,7 @@ exports.getDocument = () => {
|
||||
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.fetch = corefetch;
|
||||
dom.window.onload = () => {
|
||||
global.document = dom.window.document;
|
||||
resolve();
|
||||
|
Reference in New Issue
Block a user