الرئيسية
تسجيل الدخول
هل نسيت كلمة المرور؟
تسجيل عضوية جديدة
0
(function(){ if (window.__LSB_SHADOW__) return; window.__LSB_SHADOW__ = true; // 1) إنشاء مضيف + شادو دوم (عزل تام عن CSS الصفحة) var host = document.createElement('div'); host.id = 'lsb-host'; host.style.position = 'fixed'; host.style.left = '8px'; host.style.top = '50%'; host.style.transform = 'translateY(-50%)'; host.style.zIndex = '2147483647'; host.style.pointerEvents = 'auto'; var shadow = host.attachShadow({mode: 'open'}); // 2) CSS داخلي صغير (أيقونات أصغر + تولتيب) var css = '' + '.wrap{font-family:Segoe UI,Tahoma,Arial,sans-serif;all:initial;display:block}' + '.list{all:unset;display:flex;flex-direction:column;gap:8px;padding:4px;margin:0}' + '.item{all:unset;position:relative;display:flex;align-items:center;justify-content:center;' + 'width:36px;height:36px;border-radius:12px;background:rgba(0,0,0,.42);cursor:pointer;' + 'box-shadow:0 6px 18px rgba(0,0,0,.25);transition:transform .18s ease, background .18s ease}' + '.item:hover{transform:translateX(6px);background:rgba(0,0,0,.6)}' + '.icon{all:unset;display:block;width:20px;height:20px;border-radius:5px;object-fit:contain}' + '.tip{position:absolute;left:46px;top:50%;transform:translateY(-50%) translateX(-8px);' + 'background:rgba(18,18,20,.96);color:#fff;padding:8px 10px;border-radius:10px;min-width:140px;' + 'max-width:220px;box-shadow:0 10px 30px rgba(2,6,23,.6);opacity:0;pointer-events:none;' + 'transition:opacity .18s ease, transform .22s cubic-bezier(.2,.9,.3,1);white-space:nowrap;font:13px/1.2 Segoe UI,Tahoma,Arial,sans-serif}' + '.tip:before{content:"";position:absolute;left:-6px;top:50%;transform:translateY(-50%);' + 'border:6px solid transparent;border-right-color:rgba(18,18,20,.96)}' + '.item:hover .tip,.open .tip{opacity:1;transform:translateY(-50%) translateX(0);pointer-events:auto}' + '@media(max-width:720px){.item{width:34px;height:34px;border-radius:50%}.tip{left:44px;min-width:130px;font-size:12px}}'; var style = document.createElement('style'); style.textContent = css; shadow.appendChild(style); // 3) بناء الهيكل بدون backticks var wrap = document.createElement('div'); wrap.className = 'wrap'; var ul = document.createElement('ul'); ul.className = 'list'; ul.setAttribute('role','list'); wrap.appendChild(ul); function addItem(href, imgSrc, alt, label){ var li = document.createElement('li'); li.className = 'item'; li.setAttribute('tabindex','0'); li.setAttribute('aria-label', label); var img = document.createElement('img'); img.className = 'icon'; img.src = imgSrc; img.alt = alt; li.appendChild(img); var tip = document.createElement('div'); tip.className = 'tip'; var strong = document.createElement('strong'); strong.textContent = 'اضغط هنا للمتابعة'; var sub = document.createElement('div'); sub.style.fontSize = '12px'; sub.style.color = 'rgba(255,255,255,.85)'; sub.textContent = label; tip.appendChild(strong); tip.appendChild(sub); li.appendChild(tip); // سلوك: نقرة أولى (موبايل) تظهر التولتيب، الثانية تفتح الرابط li.addEventListener('click', function(){ if (li.classList.contains('open')) { window.open(href, '_blank', 'noopener'); } else { closeAll(); li.classList.add('open'); setTimeout(function(){ li.classList.remove('open'); }, 3500); } }); // كيبورد li.addEventListener('keydown', function(ev){ if (ev.key === 'Enter' || ev.key === ' ') { ev.preventDefault(); window.open(href, '_blank', 'noopener'); } }); // هوفر (ديسكتوب) li.addEventListener('mouseenter', function(){ closeAll(); li.classList.add('open'); }); li.addEventListener('mouseleave', function(){ li.classList.remove('open'); }); ul.appendChild(li); } function closeAll(){ var opened = ul.querySelectorAll('.open'); for (var i=0;i