Update DiscordPreview.js

This commit is contained in:
Mirco Wittrien 2019-04-07 19:29:17 +02:00
parent 14184d88d5
commit 905d32ca6b
1 changed files with 1 additions and 0 deletions

View File

@ -27,6 +27,7 @@ window.onmessage = function (e) {
document.body.firstElementChild.style.removeProperty("display");
break;
case "Eval":
window.evalResult = null;
if (e.data.jsstring) eval(`(() => {${e.data.jsstring}})()`);
window.parent.postMessage({origin:"DiscordPreview",reason:"EvalResult",result:window.evalResult},"*");
break;