Last active
August 8, 2025 04:52
-
-
Save abhijitmamarde/9c4f7afd984be80bb334289f0ed2a2ca to your computer and use it in GitHub Desktop.
Visit Homelab!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- homelab-launcher.html --> | |
| <!-- Open it using --> | |
| <!-- https://html-preview.github.io/?url=https://gist.githubusercontent.com/abhijitmamarde/9c4f7afd984be80bb334289f0ed2a2ca/raw/homelab-launcher.html --> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Visit HomeLab</title> | |
| <meta charset="UTF-8"> | |
| </head> | |
| <body> | |
| <h1>Welcome to HomeLab</h1> | |
| <button onclick="visitHomeLab()">Visit HomeLab</button> | |
| <script> | |
| async function visitHomeLab() { | |
| const gistRawUrl = 'https://gist.githubusercontent.com/abhijitmamarde/996ee5aca8097944157902f5995c3db8/raw/headless-ip.txt'; | |
| try { | |
| const response = await fetch(gistRawUrl); | |
| const ip = (await response.text()).trim(); | |
| const targetUrl = `http://${ip}:8042/myapps/showall`; | |
| // Redirect the browser | |
| window.location.href = targetUrl; | |
| } catch (error) { | |
| alert('Failed to get HomeLab IP.'); | |
| console.error(error); | |
| } | |
| } | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment