mirror of
				https://gitea.augustin64.fr/piair/MsRewards-Reborn.git
				synced 2025-11-03 23:23:53 +01:00 
			
		
		
		
	Mise en forme des codes ANSI dans les logs
This commit is contained in:
		@@ -15,7 +15,17 @@
 | 
				
			|||||||
<br><br>
 | 
					<br><br>
 | 
				
			||||||
<iframe type="text/html" src="{{url_for('static', filename='logs/1.txt')}}"  width="100%" height="85%" id="embed">
 | 
					<iframe type="text/html" src="{{url_for('static', filename='logs/1.txt')}}"  width="100%" height="85%" id="embed">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script type="text/javascript">
 | 
				
			||||||
 | 
					    const subdoc = document.getElementsByTagName("iframe")[0].contentWindow.document;
 | 
				
			||||||
 | 
					    var script = document.createElement('script');
 | 
				
			||||||
 | 
					    script.onload = function () {
 | 
				
			||||||
 | 
					        const ansiOutput = subdoc.getElementsByTagName("body")[0].getElementsByTagName("pre")[0]
 | 
				
			||||||
 | 
					        const ansi_up = new AnsiUp();
 | 
				
			||||||
 | 
					        ansiOutput.innerHTML = ansi_up.ansi_to_html(ansiOutput.innerText)
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    script.src = "https://cdn.jsdelivr.net/npm/ansi_up@4.0.4/ansi_up.js";
 | 
				
			||||||
 | 
					    document.head.appendChild(script);
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% endif %}
 | 
					{% endif %}
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user