Update DiscordPreview.js

This commit is contained in:
Mirco Wittrien 2019-01-14 21:47:27 +01:00
parent 218b79239b
commit 2e68bd9fe0
1 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,8 @@ window.onload = function () {
window.parent.postMessage({origin:"DiscordPreview",reason:"OnLoad"},"*");
};
window.onkeyup = function (e) {
window.parent.postMessage({origin:"DiscordPreview",reason:"KeyUp",which:e.which},"*");
var which = e.which;
window.parent.postMessage({origin:"DiscordPreview",reason:"KeyUp",which},"*");
};
window.onmessage = function (e) {
if (typeof e.data === "object" && e.data.origin == "ThemeRepo") {