DiscordPreview
This commit is contained in:
parent
4814aba130
commit
218b79239b
|
@ -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;
|
||||
|
|
|
@ -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") {
|
||||
|
|
Loading…
Reference in New Issue