/* Add custom JS code below */
document.addEventListener("DOMContentLoaded", function () {
setTimeout(function () {
// Constants for URLs and classes
const appStoreURL = "https://apps.apple.com/eg/app/rawat-al-safa/id6550906122";
const appStoreImage = "https://cdn.salla.network/images/appstore.png";
const googlePlayImage = "https://cdn.salla.network/images/googleplay.png";
const containerClass = "lg:col-span-2 rtl:lg:pr-20 ltr:lg:pl-20 s-apps-icons hydrated";
console.log("DOM fully loaded and parsed with a 1-second delay.");
// Create the new div element
const newElement = document.createElement("div");
newElement.className = containerClass;
newElement.innerHTML = `
تحميل تطبيق الجوال
`;
// Add temporary border and padding for visibility
newElement.style.padding = "10px";
newElement.style.marginTop = "20px";
console.log("New element created:", newElement);
// Select the parent element (footer .grid div:nth-child(5))
const parentElement = document.querySelector("footer .grid");
console.log("Parent element found:", parentElement);
// Append the new element to the selected parent
if (parentElement) {
parentElement.appendChild(newElement);
console.log("New element successfully appended to the parent element.");
} else {
console.error("Parent element not found.");
}
// Log the parent element's innerHTML for verification
if (parentElement) {
console.log("Parent element after insertion:", parentElement.innerHTML);
}
}, 1000); // 1-second delay
});