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