From 5f7669404286deac518be1aedfb722848f36a559 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sun, 7 Apr 2019 21:23:38 +0200 Subject: [PATCH] Update PluginRepo.plugin.js --- Plugins/PluginRepo/PluginRepo.plugin.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Plugins/PluginRepo/PluginRepo.plugin.js b/Plugins/PluginRepo/PluginRepo.plugin.js index 0927daacc2..c0adcff015 100644 --- a/Plugins/PluginRepo/PluginRepo.plugin.js +++ b/Plugins/PluginRepo/PluginRepo.plugin.js @@ -312,7 +312,13 @@ class PluginRepo { clearInterval(this.updateInterval); clearTimeout(this.loading.timeout); - BDFDB.removeEles("iframe.discordSanxbox",".pluginrepo-notice",".bd-pluginrepobutton",".pluginrepo-loadingicon",BDFDB.dotCN.app + " > .repo-loadingwrapper:empty"); + BDFDB.removeEles(".pluginrepo-notice",".bd-pluginrepobutton",".pluginrepo-loadingicon",BDFDB.dotCN.app + " > .repo-loadingwrapper:empty"); + + var frame = document.querySelector("iframe.discordSandbox"); + if (frame) { + window.removeEventListener("message", frame.messageReceived); + frame.remove(); + } BDFDB.unloadMessage(this); } @@ -568,7 +574,7 @@ class PluginRepo { } loadPlugins () { - BDFDB.removeEles("iframe.discordSanxbox",".pluginrepo-loadingicon"); + BDFDB.removeEles("iframe.discordSandbox",".pluginrepo-loadingicon"); var getPluginInfo, createFrame, runInFrame; var frame, framerunning = false, framequeue = [], outdated = 0, i = 0; var tags = ["getName", "getVersion", "getAuthor", "getDescription"];