diff --git a/index.ts b/index.ts index eb291a977..a62a0b616 100644 --- a/index.ts +++ b/index.ts @@ -76,8 +76,8 @@ if (layoutFromBase64.startsWith("wiki:")) { data = data.substr(start, data.indexOf("
") - start) data = data.substr(0, data.lastIndexOf("

")) - data = data.substr(startTrigger.length + 3); - + data = data.substr( data.indexOf("

") + 3) + console.log(data) try { const parsed = JSON.parse(data); parsed["id"] = layoutFromBase64 @@ -87,6 +87,7 @@ if (layoutFromBase64.startsWith("wiki:")) { new FixedUiElement(`${themeName} is invalid:
${e}`) .SetClass("clickable") .AttachTo("centermessage"); + console.error("Could not parse the text", data) throw e; } },