Update StackMonkey.ps1

This commit is contained in:
2025-06-29 04:33:18 -04:00
parent 2e6061b269
commit dedbaa8bc7

View File

@@ -856,8 +856,8 @@ function Invoke-ScriptMonkey {
#
# 1) Inline your full original CSS here
#
$style = @'
<style>
$style = @'
<style>
:root {
/* Cool Palette */
--background-color: rgba(18, 18, 18, 1);
@@ -1012,11 +1012,11 @@ function Invoke-ScriptMonkey {
.container { flex-direction:column; }
.sidebar { width:100%; }
}
</style>
'@
</style>
'@
$script = @'
<script>
$script = @'
<script>
// =======================================================================
// Tab Navigation
// =======================================================================
@@ -1040,7 +1040,7 @@ function Invoke-ScriptMonkey {
// Task Trigger
// =======================================================================
const tasks = [
{{tasksJsAll}}
{{tasksJsAll}}
];
// =======================================================================
@@ -1100,10 +1100,10 @@ function Invoke-ScriptMonkey {
});
// =======================================================================
// Fetch Sites Handler
// =======================================================================
async function fetchSites() {
// =======================================================================
// Fetch Sites Handler
// =======================================================================
async function fetchSites() {
const pwd = document.getElementById("Password").value;
if (!pwd) {
alert("Please enter the password.");
@@ -1139,7 +1139,7 @@ function Invoke-ScriptMonkey {
dropdown.innerHTML = '<option disabled selected>Error loading sites</option>';
alert("Failed to fetch sites. Check password and try again.");
}
}
}
@@ -1230,11 +1230,11 @@ function Invoke-ScriptMonkey {
});
});
// ===========================================
// rotating tagline
// ===========================================
// ===========================================
// rotating tagline
// ===========================================
document.addEventListener('DOMContentLoaded', () => {
document.addEventListener('DOMContentLoaded', () => {
const taglines = [
"Fast deployments, no monkey business.",
"Bananas for better builds.",
@@ -1258,17 +1258,17 @@ function Invoke-ScriptMonkey {
idx = (idx + 1) % taglines.length;
el.textContent = taglines[idx];
}, 10_000);
});
});
// when the browser window is closed (X), notify the server to quit
window.addEventListener('beforeunload', () => {
// when the browser window is closed (X), notify the server to quit
window.addEventListener('beforeunload', () => {
// keepalive: true ensures the request is sent even as the page unloads
fetch('/quit', { method: 'GET', keepalive: true });
});
});
</script>
</script>
'@
'@
#
# 3) The HTML skeleton with placeholders