diff --git a/plugin_loader/static/plugin_page.js b/plugin_loader/static/plugin_page.js
index 49d1aa89..b9a089a8 100644
--- a/plugin_loader/static/plugin_page.js
+++ b/plugin_loader/static/plugin_page.js
@@ -1,12 +1,3 @@
-function setPluginName(name) {
- document.getElementById("plugin_title").innerHTML = `
-
- ${name}
- `;
-}
-
function reloadIframe() {
document.getElementById("plugin_iframe").contentWindow.location.href = "http://127.0.0.1:1337/plugins/iframe";
}
@@ -83,12 +74,15 @@ function addPluginInstallPrompt(artifact, version, request_id) {
document.getElementById("plugin_title").innerText = "Plugins";
}
window.onmessage = function(ev) {
- document.getElementById("plugin_title").innerHTML = `
-
- ${ev.data}
- `;
+ let title = ev.data;
+ if (title.startsWith("PLUGIN_LOADER__")) {
+ document.getElementById("plugin_title").innerHTML = `
+
+ ${title}
+ `;
+ }
}
clearInterval(injector);
}
diff --git a/plugin_loader/templates/plugin_view.html b/plugin_loader/templates/plugin_view.html
index c95f00fb..8b1e4793 100644
--- a/plugin_loader/templates/plugin_view.html
+++ b/plugin_loader/templates/plugin_view.html
@@ -10,7 +10,7 @@
}, false);
function loadPlugin(name) {
- this.parent.postMessage(name, "https://steamloopback.host");
+ this.parent.postMessage("PLUGIN_LOADER__"+name, "https://steamloopback.host");
location.href = `/plugins/load_main/${name}`;
}