mirror of
https://github.com/partitioncloud/partitioncloud-server.git
synced 2025-01-23 17:26:26 +01:00
20 lines
622 B
JavaScript
20 lines
622 B
JavaScript
let logsEmbed = document.getElementById("logs-embed");
|
|
|
|
logsEmbed.addEventListener("load", () => {
|
|
var cssLink = document.createElement("link");
|
|
|
|
cssLink.href = "/static/style/logs.css";
|
|
cssLink.rel = "stylesheet";
|
|
cssLink.type = "text/css";
|
|
|
|
// add css
|
|
logsEmbed.contentDocument.head.appendChild(cssLink);
|
|
|
|
// Scroll to bottom
|
|
logsEmbed.contentWindow.scrollTo(0, logsEmbed.contentDocument.body.scrollHeight);
|
|
});
|
|
|
|
// check if the iframe is already loaded (happened with FF Android)
|
|
if (logsEmbed.contentDocument.readyState == "complete") {
|
|
logsEmbed.dispatchEvent(new Event("load"));
|
|
} |