Fix wiki links on mobile

This commit is contained in:
pietervdvn 2021-01-09 00:29:12 +01:00
parent 641b59bca5
commit a2bec35a43

View file

@ -76,8 +76,8 @@ if (layoutFromBase64.startsWith("wiki:")) {
data = data.substr(start,
data.indexOf("<div class=\"printfooter\">") - start)
data = data.substr(0, data.lastIndexOf("</p>"))
data = data.substr(startTrigger.length + 3);
data = data.substr( data.indexOf("<p>") + 3)
console.log(data)
try {
const parsed = JSON.parse(data);
parsed["id"] = layoutFromBase64
@ -87,6 +87,7 @@ if (layoutFromBase64.startsWith("wiki:")) {
new FixedUiElement(`<a href="${cleanUrl}">${themeName}</a> is invalid:<br/>${e}`)
.SetClass("clickable")
.AttachTo("centermessage");
console.error("Could not parse the text", data)
throw e;
}
},