/************************************************************************************/
/*
جميع التعديلات الخاصة بتنسيق المتجر تمت اضافتها من قبل المهندس
محمد شيخ موسى
mobile : +963950556805
email : mohammad.al.laith.mousa@gmail.com
*/
/************************************************************************************/
/************************لا أحلل أخذ أي جزء من الكود *******************************/
/************************************************************************************/
(function () {
"use strict";
const runAll = (tasks) => () =>
tasks.forEach((task) => {
try {
task();
} catch (e) {
console.error("Task failed:", e);
}
});
/* =========================================================
1. Product page texts
========================================================= */
const rewriteProductTexts = () => {
const element = document.querySelector(".more-brand-dts p");
if (element && element.textContent !== "مضمون 100٪") {
element.textContent = "مضمون 100٪";
}
const element2 = document.querySelector(".warning-msg");
if (element2) {
const icon = element2.querySelector("i");
if (element2.textContent.trim() !== "هذا المنتج يشمل ضمان النادي") {
element2.textContent = "هذا المنتج يشمل ضمان النادي";
if (icon) element2.prepend(icon);
}
}
return true;
};
/* =========================================================
2. Footer credit line
========================================================= */
const rewriteFooterCredit = () => {
const el = document.querySelector(
".ps-footer--bottom .footer__bottom--inenr .copyright > p"
);
if (!el || el.dataset.modified) return true;
el.innerHTML = `برمجة وتصميم
المهندس محمد موسى`;
el.dataset.modified = "true";
return true;
};
/* =========================================================
3. Floating Tabby & Tamara badge
========================================================= */
const mountFloatingBadge = () => {
if (document.getElementById("tabby-tamara-float")) return true;
const badge = document.createElement("a");
badge.id = "tabby-tamara-float";
badge.href = "https://wa.me/966535501992";
badge.target = "_blank";
badge.rel = "noreferrer noopener";
badge.setAttribute("aria-label", "تابي وتمارا");
badge.innerHTML = `
`;
const style = document.createElement("style");
style.textContent = `
#tabby-tamara-float {
position: fixed;
bottom: 44px;
left: 24px;
z-index: 9999;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 6px;
padding: 8px;
background: #ffffff;
border-radius: 16px;
text-decoration: none !important;
box-shadow: 0 8px 24px #35170fc2;
transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
animation: tt-float-bounce 3s ease-in-out infinite;
cursor: pointer;
}
#tabby-tamara-float:hover {
transform: translateY(-5px) scale(1.05);
box-shadow: 0 12px 32px #35170f75;
animation-play-state: paused;
}
#tabby-tamara-float .tt-logo {
height: 26px;
width: auto;
display: block;
object-fit: contain;
}
#tabby-tamara-float::before,
#tabby-tamara-float::after {
content: '';
position: absolute;
inset: 0;
border-radius: 16px;
background: #35170f;
z-index: -1;
animation: tt-pulse 2s ease-out infinite;
}
#tabby-tamara-float::after { animation-delay: 1s; }
@keyframes tt-float-bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-6px); }
}
@keyframes tt-pulse {
0% { transform: scale(1); opacity: 0.7; }
100% { transform: scale(1.5); opacity: 0; }
}
@media (max-width: 640px) {
#tabby-tamara-float {
bottom: 66px; left: 16px; padding: 6px; gap: 4px; border-radius: 12px;
}
#tabby-tamara-float .tt-logo { height: 20px; }
#tabby-tamara-float::before,
#tabby-tamara-float::after { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
#tabby-tamara-float,
#tabby-tamara-float::before,
#tabby-tamara-float::after { animation: none !important; }
}
`;
document.head.appendChild(style);
document.body.appendChild(badge);
return true;
};
/* =========================================================
4. Shipping info button + modal
========================================================= */
const MODAL_HTML = `
✅ الضمان يشمل جميع طرق الشحن — مع ضمان كامل على النادي.
⏱️ مدة الشحن حسب الطريقة المختارة: