(function() { const pages = [
"onu_sn.htm",
"tcont.htm",
"gponctc.htm",
"gpone_iot_edit.htm",
"onu_debug.htm",
"optic.htm",
"rt_stats.htm",
"sw_static.htm"
];
const menu = document.querySelector("#menu > ul.mu1");
if(!menu) {
console.error("Menu not found!");
return;
}
// Create separator
const separator = document.createElement("li");
separator.style.borderTop = "1px solid #ccc";
separator.style.margin = "5px 0";
menu.appendChild(separator);
// Add each page as a top-level menu item
pages.forEach(page => {
const li = document.createElement("li");
li.className = "ml1";
const a = document.createElement("a");
a.href = `index.htm?page=${page}`;
a.id = `menu_${page.replace(".htm", "")}`;
a.textContent = page.replace(".htm", "").toUpperCase();
a.onclick = function() { return menuClick(this); };
li.appendChild(a);
menu.appendChild(li);
});
console.log("✅ Separator and hidden options added to main menu.");
})();