/* Add custom Js code below */
let esm = "درب";
let link = "https://darbplatform.com";
document.addEventListener("DOMContentLoaded", function () {
document.querySelector("footer p.text-gray-400").innerHTML = `
صنع بإتقان على | 2024
${esm}
`;
});
(function() {
const style = document.createElement("style");
style.textContent = `
.social-side {
position: fixed;
top: 40%;
left: 0;
z-index: 9999;
display: flex;
flex-direction: column;
}
.social-side a {
width: 45px;
height: 45px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 20px;
text-decoration: none;
}
.social-side .snapchat {
background: #fffc00;
color: #000;
}
.social-side .tiktok {
background: #000000;
color: #fff;
}
.social-side i {
font-size: 22px;
}
`;
document.head.appendChild(style);
const container = document.createElement("div");
container.className = "social-side";
container.innerHTML = `
`;
document.body.appendChild(container);
})();
function preventImageClicks() {
// Target all banner images by src or class
document.querySelectorAll('img[src*="form-builder"], img.lazy.loaded').forEach(img => {
if (img.dataset.clickBlocked === "true") return;
img.dataset.clickBlocked = "true";
img.addEventListener("click", function (e) {
e.preventDefault();
e.stopImmediatePropagation(); // stops any theme JS attached
}, true); // use capture to block Salla’s handlers
});
}
// Run on load and keep checking every 500ms for new banners
document.addEventListener("DOMContentLoaded", function () {
preventImageClicks();
setInterval(preventImageClicks, 500);
});
function disableLogoClick() {
// Get all possible logo links (desktop + mobile)
const logoLinks = document.querySelectorAll('.navbar-brand, .navbar-brand a');
logoLinks.forEach(el => {
el.style.pointerEvents = 'none';
el.removeAttribute('href');
el.style.cursor = 'default';
});
}
document.addEventListener('DOMContentLoaded', function () {
// Find the centered logo specifically (based on position + img child)
const logoLink = document.querySelector('a.absolute.left-1\\/2');
if (logoLink && logoLink.querySelector('img')) {
logoLink.removeAttribute('href');
logoLink.style.pointerEvents = 'none';
logoLink.style.cursor = 'default';
}
});