document.addEventListener("DOMContentLoaded", function() { // Give the DOM a moment to fully load setTimeout(function() { // Use a more general selector to ensure we target the menu correctly const mainMenu = document.querySelector('ul.main-menu'); if (mainMenu) { // Log to confirm the menu was found console.log("Menu found:", mainMenu); // Create a new
  • element for "القائمة الرئيسية" const homeMenuItem = document.createElement('li'); homeMenuItem.className = 'lg:hidden text-sm font-bold'; // Set the inner HTML of the
  • to include the "الرئيسية" link homeMenuItem.innerHTML = `االقائمة الرئيسية`; // Insert the new
  • at the beginning of the