From 218b79239b650e0e33e69d0e1ef8e7c95b149f25 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Mon, 14 Jan 2019 21:39:18 +0100 Subject: [PATCH] DiscordPreview --- Plugins/ThemeRepo/ThemeRepo.plugin.js | 5 ++--- Plugins/ThemeRepo/res/DiscordPreview.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Plugins/ThemeRepo/ThemeRepo.plugin.js b/Plugins/ThemeRepo/ThemeRepo.plugin.js index 13e94fc04b..c2c090fdf1 100644 --- a/Plugins/ThemeRepo/ThemeRepo.plugin.js +++ b/Plugins/ThemeRepo/ThemeRepo.plugin.js @@ -3,7 +3,7 @@ class ThemeRepo { getName () {return "ThemeRepo";} - getVersion () {return "1.6.7";} + getVersion () {return "1.6.8";} getAuthor () {return "DevilBro";} @@ -445,7 +445,6 @@ class ThemeRepo { }; var messageReceived = e => { - console.log(e); if (typeof e.data === "object" && e.data.origin == "DiscordPreview") { switch (e.data.reason) { case "OnLoad": @@ -619,7 +618,7 @@ class ThemeRepo { this.downloadTheme(data); if (themeRepoModal.querySelector("#input-rnmstart").checked) setTimeout(() => {this.applyTheme(data);},3000); }); - entry.querySelector(".previewCheckbox").addEventListener("change", e => { + entry.querySelector(".previewCheckbox").addEventListener("click", e => { if (e.currentTarget.checked) themeRepoModal.querySelectorAll(".previewCheckbox").forEach(checkbox => { if (e.currentTarget != checkbox) { checkbox.checked = false; diff --git a/Plugins/ThemeRepo/res/DiscordPreview.js b/Plugins/ThemeRepo/res/DiscordPreview.js index b659c5f35b..8f597f4684 100644 --- a/Plugins/ThemeRepo/res/DiscordPreview.js +++ b/Plugins/ThemeRepo/res/DiscordPreview.js @@ -2,7 +2,7 @@ window.onload = function () { window.parent.postMessage({origin:"DiscordPreview",reason:"OnLoad"},"*"); }; window.onkeyup = function (e) { - window.parent.postMessage({origin:"DiscordPreview",reason:"KeyUp",which:e.which,key:e},"*"); + window.parent.postMessage({origin:"DiscordPreview",reason:"KeyUp",which:e.which},"*"); }; window.onmessage = function (e) { if (typeof e.data === "object" && e.data.origin == "ThemeRepo") {