forked from MapComplete/MapComplete
		
	Fix wiki links on mobile
This commit is contained in:
		
							parent
							
								
									641b59bca5
								
							
						
					
					
						commit
						a2bec35a43
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		
							
								
								
									
										5
									
								
								index.ts
									
										
									
									
									
								
							
							
						
						
									
										5
									
								
								index.ts
									
										
									
									
									
								
							|  | @ -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; | ||||
|             } | ||||
|         }, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue