// const whatsappIcon = document.createElement('div'); // whatsappIcon.style.position = 'fixed'; // whatsappIcon.style.bottom = '20px'; // whatsappIcon.style.right = '20px'; // whatsappIcon.style.width = '50px'; // whatsappIcon.style.height = '50px'; // whatsappIcon.style.backgroundImage = "url('https://cdn.salla.sa/form-builder/CQTXhHLCHLmx9KsxtaIwwA2VmHb327yD7adiDNAf.png')"; // whatsappIcon.style.backgroundSize = 'cover'; // whatsappIcon.style.cursor = 'pointer'; // whatsappIcon.style.zIndex = '1000'; // whatsappIcon.addEventListener('click', () => { // window.location.href = 'https://api.whatsapp.com/send/?phone=966544089015&text&type=phone_number&app_absent=0'; // }); // document.body.appendChild(whatsappIcon); // document.addEventListener("DOMContentLoaded", function () { // const alertSection = document.createElement('div'); // alertSection.id = 'alert_section'; // const hideAlertAdvertising = document.createElement('div'); // hideAlertAdvertising.id = 'hideAlertAdvertising'; // hideAlertAdvertising.style = 'position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 9998;'; // const alertWrapper = document.createElement('div'); // alertWrapper.id = 'alert_wrapper'; // alertWrapper.style = ` // text-align: center; // width: 50%; // max-width: 500px; // margin: 0 auto; // background-color: #ffffff; // border-radius: 16px; // padding: 1rem; // z-index: 99999; // position: fixed; // top: 50%; // left: 50%; // transform: translate(-50%, -50%) scale(0.7); // opacity: 0; // transition: transform 0.5s ease, opacity 0.5s ease; // box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); // `; // const alertCloseIcon = document.createElement('div'); // alertCloseIcon.id = 'alert_close_icon'; // alertCloseIcon.style = 'position: absolute; top: 10px; left: 10px; cursor: pointer;'; // const closeButton = document.createElement('button'); // closeButton.innerHTML = ` // cancel // // `; // alertCloseIcon.appendChild(closeButton); // const alertImage = document.createElement('div'); // alertImage.id = 'alert_image'; // const image = document.createElement('img'); // image.src = 'https://cdn.salla.sa/cdn-cgi/image/fit=scale-down,width=400,height=400,onerror=redirect,format=auto/rAavxQ/2KoPJ2LCv4SSqH5yeV6uDM59JiN1vrYpdmvhrkih.png'; // image.style = 'max-width: 100%; height: auto; border-radius: 10px; margin: 0 auto;'; // alertImage.appendChild(image); // const alertMainTitle = document.createElement('div'); // alertMainTitle.id = 'alert_main_title'; // const mainTitle = document.createElement('h4'); // mainTitle.textContent = 'كود خصم لأول طلب'; // alertMainTitle.appendChild(mainTitle); // const alertTitle = document.createElement('div'); // alertTitle.id = 'alert_title'; // const title = document.createElement('h6'); // title.textContent = 'NAD10'; // alertTitle.appendChild(title); // const alertLink = document.createElement('div'); // alertLink.id = 'alert_link'; // const link = document.createElement('a'); // link.href = 'https://nad-line.com/ar/ready-to-wear/c1668270683'; // link.classList.add('alert-button'); // link.textContent = 'معرفة المزيد'; // link.style = 'display: inline-block; padding: 10px 20px; background-color: rgb(209, 195, 186); color: white; text-decoration: none; border-radius: 5px;'; // // alertLink.appendChild(link); // const alertDropdown = document.createElement('div'); // alertDropdown.id = 'alert_dropdown'; // alertSection.appendChild(hideAlertAdvertising); // alertSection.appendChild(alertWrapper); // alertWrapper.appendChild(alertCloseIcon); // alertWrapper.appendChild(alertImage); // alertWrapper.appendChild(alertMainTitle); // alertWrapper.appendChild(alertTitle); // alertWrapper.appendChild(alertLink); // alertWrapper.appendChild(alertDropdown); // document.body.appendChild(alertSection); // function showAlert() { // setTimeout(function() { // alertSection.style.display = 'flex'; // إظهار الخلفية الشفافة // }, 200); // تأخير 200 ملي ثانية لإظهار الخلفية بعد بداية التحويل // alertWrapper.style.transform = 'translate(-50%, -50%) scale(1)'; // alertWrapper.style.opacity = '1'; // } // function closeAlert() { // alertWrapper.style.transform = 'translate(-50%, -50%) scale(0.7)'; // alertWrapper.style.opacity = '0'; // setTimeout(function () { // alertSection.style.display = 'none'; // }, 500); // } // alertCloseIcon.addEventListener('click', closeAlert); // hideAlertAdvertising.addEventListener('click', closeAlert); // setTimeout(showAlert, 2500); // link.addEventListener("mouseover", function() { // link.style.backgroundColor = "#0056b3"; // }); // link.addEventListener("mouseout", function() { // link.style.backgroundColor = "#007bff"; // }); // const style = document.createElement('style'); // style.innerHTML = ` // #hideAlertAdvertising { // position: fixed; // top: 0; // left: 0; // right: 0; // bottom: 0; // background: rgba(0, 0, 0, 0.5); // z-index: 9998; // } // @media (min-width: 768px) { // #alert_section { // width: 400px; // height: auto; // } // } // @media (max-width: 768px) { // #alert_section { // width: 90%; // height: auto; // } // } // `; // document.head.appendChild(style); // });