Created
May 31, 2021 10:06
-
-
Save a-r-m-i-n/f4f4841a6a8e249c4b8f481272ad4b76 to your computer and use it in GitHub Desktop.
Ein kombiniertes, herunterladbares Gist mit HTML/JS, um die LEDs einer alten FritzBox komplett zu deaktivieren. Gefunden in diesem Blog-Post: https://www.ifun.de/fritzbox-leds-komplett-ausschalten-einfaches-script-deaktiviert-router-leuchten-102913/
This file contains 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
header { | |
width:100%; | |
position:relative; | |
top:0; | |
left:0; | |
background-color:#006ec0; | |
color:white; | |
font-size:50px; | |
text-align:center; | |
font-family:Arial; | |
padding-top:15px; | |
padding-bottom:15px; | |
} | |
header > img { | |
color:yellow; | |
font-size:33%; | |
float:left; | |
margin-left:30px; | |
} | |
body { | |
background-color:#f0eee6; | |
font-family: Arial; | |
} | |
div > form { | |
text-align:center; | |
border:solid gray 1px; | |
background:white; | |
width:33%; | |
padding:3%; | |
margin:10% 33% 10% 33%; | |
} | |
div > form > label { | |
display:block; | |
text-align:center; | |
} | |
div > form > button { | |
background-color:#006ec0; | |
border:0px; color:white; | |
font-size:23px; | |
min-width:100px; | |
padding:10px; | |
} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<link rel="shortcut icon" type="image/x-ico" href="http://fritz.box/favicon.ico" /> | |
<link rel="stylesheet" type="text/css" href="fbled.css" /> <title></title> | |
<script type="text/javascript"> | |
function getQuerystring(key, default_) { | |
if (default_==null) default_=""; | |
key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); | |
var regex = new RegExp("[\\?&]"+key+"=([^&#]*)"); | |
var qs = regex.exec(window.location.href); | |
if(qs == null || qs[1] == '') | |
return default_; | |
else | |
return qs[1]; | |
} | |
</script> | |
</head> | |
<body> | |
<header> | |
<img src="http://fritz.box/favicon.ico" width="32" height="32" alt="Keine Fritz!Box erkannt">Fritz!Box LEDs an/aus | |
</header> | |
<script type="text/javascript"> | |
var sid_default="0123456789abcdef"; | |
var url_default="http://fritz.box"; | |
var sid=getQuerystring('sid',sid_default); | |
var url=decodeURIComponent(getQuerystring('url',url_default)); document.title = url; document.write('<div>' | |
+'<form method=\"POST\" action=\"'+url+'/system/led_display.lua?sid='+sid+'\" name=\"main_form\">' | |
+'<label><input name=\"led_display\" id=\"uiViewLedDisplay0\" value=\"0\" onchange=\"OnChangeLedDisplay(0)\" type=\"radio\">LED-Anzeige an<\/label>' | |
+'<label><input name=\"led_display\" id=\"uiViewLedDisplay2\" value=\"2\" onchange=\"OnChangeLedDisplay(1)\" checked=\"checked\" type=\"radio\">LED-Anzeige aus<\/label>' | |
+'<input name=\"sid\" value=\"'+sid+'\" type=\"hidden\">' | |
+'<button type=\"submit\" id=\"uiApply\" name=\"apply\">Ok<\/button>' | |
+'<\/form>' | |
+'<\/div>'); </script> | |
<noscript><h1>JavaScript disabled?!</h1></noscript> | |
</body> | |
</html> |
This file contains 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
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>FritzBox LEDs an/aus</title> | |
<link rel="shortcut icon" type="image/x-ico" href="http://fritz.box/favicon.ico" /> | |
<link rel="stylesheet" type="text/css" href="fbled.css" /> | |
</head> | |
<body> | |
<header> | |
<img src="http://fritz.box/favicon.ico" width="32" height="32" alt="Keine Fritz!Box erkannt">Fritz!Box LED-Schalter | |
</header> | |
<div> | |
<form method="GET" action="gqs.html"> | |
Bitte aktueller Session ID eingeben<br/> | |
(findest du in den Menü-Links nachdem du dich<br/> | |
unter https://fritz.box angemeldet hast).<br/><br/> | |
Dann "Absenden" klicken. Die LEDs sind danach aus/an.<br/><br/> | |
<label>Session ID: <input type="password" name="sid"></label> | |
<br/> | |
<label>Fritz!Box URL: <input type="url" name="url" value="https://fritz.box"></label> | |
<br/> | |
<button type="submit">Absenden</button> | |
</form> | |
</div> | |
Auf die Links klicken, um den Sourcecode anzuzeigen.<br/> | |
Browser-Zurück Taste um wieder hierher zurückzukehren. | |
<p><a href="index.txt">index.html</a></p> | |
<p><a href="gqs.txt">gqs.html</a></p> | |
<p><a href="fbled.css">fbled.css</a></p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment