Skip to content

Commit da55e45

Browse files
committed
testing custom launch button
1 parent ee7b14d commit da55e45

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
window.addEventListener("DOMContentLoaded", () => {
2-
const targetContainer = document.querySelector(".launch-buttons");
2+
const header = document.querySelector("header");
33

4-
if (targetContainer) {
5-
// Create the new button
4+
if (header) {
65
const customButton = document.createElement("a");
76
customButton.textContent = "Launch Custom JupyterHub";
8-
customButton.className = "jb-button custom-launch-button";
9-
customButton.style.marginLeft = "10px";
7+
customButton.className = "custom-launch-button";
108
customButton.style.backgroundColor = "#007ACC";
119
customButton.style.color = "white";
1210
customButton.style.padding = "6px 12px";
11+
customButton.style.marginLeft = "10px";
1312
customButton.style.borderRadius = "4px";
1413
customButton.style.textDecoration = "none";
14+
customButton.style.fontWeight = "bold";
1515

1616
// Set your custom URL here
17-
const customUrl = "https://your-custom-jupyterhub-url/lab";
18-
customButton.href = customUrl;
17+
customButton.href = "https://your-custom-jupyterhub-url/lab";
1918
customButton.target = "_blank";
2019

21-
// Add the button to the page
22-
targetContainer.appendChild(customButton);
20+
header.appendChild(customButton);
2321
}
2422
});

0 commit comments

Comments
 (0)