/* Add custom content to the footer */ // Wait for the DOM to fully load document.addEventListener("DOMContentLoaded", function () { // Create a new anchor element const link = document.createElement("a"); link.href = "#"; // Replace with your custom link link.target = "_blank"; // Open link in a new tab link.rel = "noopener noreferrer"; // Create a container for the image and text const container = document.createElement("div"); container.style.display = "inline-block"; // Keeps the content inline container.style.textAlign = "center"; // Center the text above the image // Create a text element const text = document.createElement("p"); text.textContent = "مصرح من"; // Replace with your custom text text.style.margin = "0"; // Remove margin text.style.fontSize = "18px"; // Adjust text size text.style.fontWeight = "bold"; // Optional: make the text bold // Create the image element const img = document.createElement("img"); img.src = "https://www.sfda.gov.sa/themes/custom/sfda/assets/images/sfda_logo_colored.svg"; // Replace with your image URL img.alt = "الهيئة العامة للغذاء والدواء"; img.style.width = "240px"; // Adjust as needed img.style.height = "auto"; img.style.marginTop = "25px"; // Add space between text and image // Create the second image element const img2 = document.createElement("img"); img2.src = "https://cdn.saudibusiness.gov.sa/v2/dist//images/headerIcons/Logo.svg"; // Replace with your image URL img2.alt = "مركز الاعمال السعودي"; img2.style.width = "240px"; // Adjust as needed img2.style.height = "auto"; img2.style.marginTop = "20px"; // Add space between text and image // Append the text and image to the container container.appendChild(text); container.appendChild(img); container.appendChild(img2); // Append the container to the link link.appendChild(container); // Find the footer container const footerContainer = document.querySelector("footer .container"); // Update selector as needed if (footerContainer) { // Append the link to the footer container footerContainer.appendChild(link); } /* Footer Social List */ const socials = document.querySelector('.store-footer__inner div:has( > .s-social-list)'); const sallaAppsIcons = document.querySelector('salla-apps-icons'); const socialsTitle = `

تابعنا علي

`; socials.setAttribute('class', ''); sallaAppsIcons.insertAdjacentHTML('afterbegin', socialsTitle); sallaAppsIcons.appendChild(socials); document.querySelector('.store-footer .contact-social').style.display = "none"; document.querySelector('.store-footer__inner salla-apps-icons > div').style.display = "block"; }); let name = "منصة سهم"; let link = "https://sahhm.com/"; document.addEventListener("DOMContentLoaded", function () { document.querySelector(".copyright-text p").innerHTML = ` صنع بحب على | 2024 ${name} `; });