From 7c2e829df704a2d5a898dbe196b5fc38284c35a4 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Wed, 17 Aug 2022 18:31:23 +0100 Subject: [PATCH] Fix nav arrangement. --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index fc931b1..1ccae03 100644 --- a/index.js +++ b/index.js @@ -312,8 +312,7 @@ function PerformNavResize() { } } if (menc.length > 0) { - for (vmeni = 0; vmeni < menc.length; vmeni++) {vmen.removeChild(menc[vmeni]);} - for (vmeni = menc.length - 1; vmeni >= 0; vmeni--) {InsertBefore(men, menc[vmeni]);} + for (vmeni = 0; vmeni < menc.length; vmeni++) {men.appendChild(men.removeChild(menc[vmeni]));} } else { for (vmeni = 0; vmeni < men.childNodes.length; vmeni++) { if (men.childNodes[vmeni].nodeType === Node.ELEMENT_NODE) { @@ -323,7 +322,8 @@ function PerformNavResize() { mensz += menaw } } - for (vmeni = 0; vmeni < menc.length; vmeni++) {vmen.appendChild(men.removeChild(menc[vmeni]));} + for (vmeni = 0; vmeni < menc.length; vmeni++) {men.removeChild(menc[vmeni]);} + for (vmeni = menc.length - 1; vmeni >= 0; vmeni--) {InsertBefore(vmen, menc[vmeni]);} } } }