Replace firstChild with firstElementChild (Thanks to @un000000)

This commit is contained in:
slawkens
2026-01-30 22:56:19 +01:00
parent 52a6256905
commit 496499abbb
2 changed files with 10 additions and 10 deletions

View File

@@ -82,13 +82,13 @@ if(isset($config['boxes']))
// mouse-over and click events of the loginbox // mouse-over and click events of the loginbox
function MouseOverLoginBoxText(source) function MouseOverLoginBoxText(source)
{ {
source.lastChild.style.visibility = "visible"; source.lastElementChild.style.visibility = "visible";
source.firstChild.style.visibility = "hidden"; source.firstElementChild.style.visibility = "hidden";
} }
function MouseOutLoginBoxText(source) function MouseOutLoginBoxText(source)
{ {
source.firstChild.style.visibility = "visible"; source.firstElementChild.style.visibility = "visible";
source.lastChild.style.visibility = "hidden"; source.lastElementChild.style.visibility = "hidden";
} }
function LoginButtonAction() function LoginButtonAction()
{ {
@@ -205,11 +205,11 @@ if(isset($config['boxes']))
// mouse-over effects of menubuttons and submenuitems // mouse-over effects of menubuttons and submenuitems
function MouseOverMenuItem(source) function MouseOverMenuItem(source)
{ {
source.firstChild.style.visibility = "visible"; source.firstElementChild.style.visibility = "visible";
} }
function MouseOutMenuItem(source) function MouseOutMenuItem(source)
{ {
source.firstChild.style.visibility = "hidden"; source.firstElementChild.style.visibility = "hidden";
} }
function MouseOverSubmenuItem(source) function MouseOverSubmenuItem(source)
{ {

View File

@@ -1,11 +1,11 @@
function MouseOverBigButton(source) { function MouseOverBigButton(source) {
if (source?.firstChild?.style) { if (source?.firstElementChild?.style) {
source.firstChild.style.visibility = "visible"; source.firstElementChild.style.visibility = "visible";
} }
} }
function MouseOutBigButton(source) { function MouseOutBigButton(source) {
if (source?.firstChild?.style) { if (source?.firstElementChild?.style) {
source.firstChild.style.visibility = "hidden"; source.firstElementChild.style.visibility = "hidden";
} }
} }
function BigButtonAction(path) { function BigButtonAction(path) {