mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-06-05 18:41:58 -09:00
32 lines
800 B
JavaScript
32 lines
800 B
JavaScript
var backgroundLogs = document.createElement("div");
|
|
backgroundLogs.style = `
|
|
color: lime;
|
|
opacity: 0.1;
|
|
font-family: monospace;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
z-index: -1;
|
|
pointer-events: none;
|
|
overflow: none;
|
|
user-select: none;
|
|
`;
|
|
const bgLogsList = [];
|
|
document.documentElement.appendChild(backgroundLogs);
|
|
var dirty = true;
|
|
function backgroundLog(text, unSuppress) {
|
|
var linesExcess = backgroundLogs.scrollHeight - window.innerHeight;
|
|
for (i = 0; i < linesExcess; i++) {
|
|
bgLogsList.shift();
|
|
}
|
|
bgLogsList.push(text);
|
|
dirty = true;
|
|
if (!unSuppress) {
|
|
return;
|
|
}
|
|
dirty = false;
|
|
backgroundLogs.innerText = bgLogsList.join("\n");
|
|
}
|
|
backgroundLog("Awaiting input..."); |