نتحقق من المشاركة

عجلة الحظ

اضغط وانتظر نتيجتك

<svg class="pointer-svg" viewBox="0 0 36 48" fill="none"> </svg>
<button class="btn-cta mt-4" id="spinBtn"> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2.5"></svg> لف العجلة </button>
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1.5"></svg>

مبروك يا بطل، فزت بـ

<button class="btn-whatsapp" id="shareBtn"> <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"></svg> شارك في الواتساب </button>
<svg width="12" height="12" fill="currentColor" viewBox="0 0 20 20"></svg> بطاقة هدية مؤكدة
تهانينا يا بطل
رقم البطاقة
تاريخ الإصدار
الحالة✓ نشطة
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1.5"></svg>

التقط صورة للشاشة الحين
احتفظ بالصورة، راح تحتاجها لما تتواصل معنا

<button class="btn-cta" id="claimBtn"> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2"></svg> استلم هديتك الحين </button>
<svg fill="none" stroke="#EF4444" viewBox="0 0 24 24" stroke-width="1.5"></svg>

استخدمت محاولتك اليوم

كل عميل يقدر يجرب حظه مرة واحدة بس في اليوم
ترقب هدايا جديدة بكرة

موعد المحاولة الجاية: بكرة الصبح
لا تفوت العروض اليومية من متجر كرانش

<button class="btn-cta"https://crunsh5.com'"> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2"></svg> تصفح متجر كرانش </button>
`; // Inject CSS const style = document.createElement('style'); style.textContent = css; document.head(style); // Inject HTML using createContextualFragment (handles SVG correctly) const script = document.currentScript; const range = document.createRange(); const fragment = range.createContextualFragment(html); script.insertBefore(fragment, script.nextSibling); // JS Logic setTimeout(function(){ const PRIZES=["اشتراك بلس لايباد (سنة)","اشتراك لاندرويد (سنة)","كود سناب زيرو (يوم)","كود سناب زيرو (7 أيام)","خصم 15% للطلبات"]; const WHEEL_LABELS=["بلس آيباد","بلس أندرويد","سناب زيرو","زيرو أسبوع","خصم 15%"]; const SEGMENT_COLORS=[{start:'#6D28D9',end:'#4C1D95'},{start:'#7C3AED',end:'#5B21B6'},{start:'#8B5CF6',end:'#6D28D9'},{start:'#A855F7',end:'#7C3AED'},{start:'#9333EA',end:'#6D28D9'}]; const STORE_WHATSAPP="966547495503"; const VIRAL_TEXT="هلا والله \uD83D\uDC4B\nتوني طحت على كنز تقني ما يتفوت\nمتجر \"كرانش\" مسوين فعالية رهيبة اسمها \"هدية اليوم\"، يوزعون اشتراكات بلس للآيباد والأندرويد وأكواد سناب وهدايا تبرد القلب \uD83C\uDF81\uD83D\uDD25\n\nأنا توني جربت حظي وربحت معهم، وبصراحة المتجر فخم وثقة ومضمون 100٪، فقلت لازم أوصيكم عليه وتستفيدون.\nادخلوا الحين ولفوا العجلة وشوفوا وش يطلع لكم:\n\uD83D\uDC47\n[ https://crunsh5.com ]"; const VIRAL_MSG=encodeURIComponent(VIRAL_TEXT); let isSpinning=false,wonPrizeIndex=-1,shareCount=0,isVerifying=false; const canvas=document.getElementById('wheelCanvas'); const ctx=canvas.getContext('2d'); const CX=canvas.width/2,CY=canvas.height/2,R=260; function drawWheel(rotDeg=0){ ctx.clearRect(0,0,canvas.width,canvas.height); ctx.save(); ctx.translate(CX,CY); ctx.rotate(rotDeg*Math.PI/180); ctx.translate(-CX,-CY); const sa=(2*Math.PI)/WHEEL_LABELS.length; for(let i=0;i90&°<270; if(isBottom)ctx.rotate(Math.PI); ctx.fillStyle='rgba(255,255,255,0.92)'; ctx.font='bold 26px Tajawal, sans-serif'; ctx.textAlign='center';ctx.textBaseline='middle'; ctx.shadowColor='rgba(0,0,0,0.6)';ctx.shadowBlur=6;ctx.shadowOffsetX=0;ctx.shadowOffsetY=2; const textX=isBottom?-R*0.62:R*0.62; ctx.fillText(WHEEL_LABELS[i],textX,0); ctx.shadowColor='rgba(123,45,255,0.3)';ctx.shadowBlur=10; ctx.fillText(WHEEL_LABELS[i],textX,0); ctx.restore(); } const gloss=ctx.createLinearGradient(CX,CY-R,CX,CY); gloss.addColorStop(0,'rgba(255,255,255,0.12)');gloss.addColorStop(0.4,'rgba(255,255,255,0.03)');gloss.addColorStop(1,'rgba(255,255,255,0)'); ctx.beginPath();ctx.arc(CX,CY,R,-Math.PI/2,Math.PI/2);ctx.fillStyle=gloss;ctx.fill(); const dark=ctx.createLinearGradient(CX,CY,CX,CY+R); dark.addColorStop(0,'rgba(0,0,0,0)');dark.addColorStop(1,'rgba(0,0,0,0.25)'); ctx.beginPath();ctx.arc(CX,CY,R,Math.PI/2,-Math.PI/2);ctx.fillStyle=dark;ctx.fill(); ctx.restore(); } function showSection(id){ document.querySelectorAll('.crunsh-section').forEach(s=>s.classList.remove('active')); document.getElementById(id).classList.add('active'); } function checkDailyLimit(){ return localStorage.getItem('crunsh_lastSpinDate')!==new Date().toDateString(); } (function init(){ drawWheel(); if(!checkDailyLimit())showSection('dailyLimitSection'); })(); window.spinWheel=function(){ if(isSpinning)return; if(!checkDailyLimit()){showSection('dailyLimitSection');return;} isSpinning=true; document.getElementById('spinBtn').disabled=true; wonPrizeIndex=Math.floor(Math.random()*PRIZES.length); const sliceDeg=360/PRIZES.length; const extraSpins=5; const targetOffset=360-sliceDeg/2-wonPrizeIndex*sliceDeg; const totalRotation=extraSpins*360+targetOffset; const duration=5000; const startTime=performance.now(); function easeOut(t){return 1-Math.pow(1-t,3)} function animate(now){ const elapsed=now-startTime; const progress=Math.min(elapsed/duration,1); const eased=easeOut(progress); const currentRotation=totalRotation*eased; drawWheel(currentRotation); if(progress<1)requestAnimationFrame(animate); else{ isSpinning=false; localStorage.setItem('crunsh_lastSpinDate',new Date().toDateString()); setTimeout(()=>{ document.getElementById('wonPrizeText').textContent=PRIZES[wonPrizeIndex]; showSection('resultSection'); fireConfetti(); },400); } } requestAnimationFrame(animate); } window.handleShare=function(){ if(isVerifying||shareCount>=5)return; isVerifying=true; document.getElementById('shareBtn').disabled=true; document.getElementById('progressCounter').style.display='flex'; document.getElementById('loadingOverlay').classList.add('active'); const status=document.getElementById('shareStatus'); status.textContent='';status.className='share-status'; if(navigator.share){ navigator.share({title:'هدية اليوم - كرانش',text:VIRAL_TEXT,url:'https://crunsh5.com'}).then(()=>{ setTimeout(()=>verifyShare(true),1200); }).catch(()=>{ document.getElementById('loadingOverlay').classList.remove('active'); isVerifying=false; document.getElementById('shareBtn').disabled=false; status.textContent='لم تتم المشاركة، حاول مرة ثانية'; status.className='share-status error'; }); }else{ window.open('https://wa.me/?text='+VIRAL_MSG,'_blank'); let returned=false,verified=false; const if(document.hidden||returned)return; returned=true; document.removeEventListener('visibilitychange',onVisible); setTimeout(()=>{if(!verified){verified=true;verifyShare(true)}},800); }; document.addEventListener('visibilitychange',onVisible); setTimeout(()=>{if(!verified){verified=true;document.removeEventListener('visibilitychange',onVisible);verifyShare(true)}},8000); } } function verifyShare(success){ shareCount++; document.getElementById('shareCount').textContent=shareCount; document.getElementById('loadingOverlay').classList.remove('active'); isVerifying=false; const status=document.getElementById('shareStatus'); status.textContent='تم التحقق: '+shareCount+' من 5'; status.className='share-status success'; if(shareCount>=5){ document.getElementById('shareBtn')='<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg> تمت المشاركة'; document.getElementById('shareBtn').style.background='linear-gradient(135deg,#22C55E,#16A34A)'; setTimeout(()=>{ const now=new Date(); document.getElementById('giftCardPrize').textContent=PRIZES[wonPrizeIndex]; document.getElementById('cardNumber').textContent='CRUNSH-'+Math.random().toString(36).substr(2,6).toUpperCase()+'-'+Math.floor(Math.random()*9999); document.getElementById('cardDate').textContent=now.toLocaleDateString('ar-SA'); showSection('giftCardSection'); fireConfetti(); },700); }else{ document.getElementById('shareBtn').disabled=false; } } window.claimGift=function(){ const prize=PRIZES[wonPrizeIndex]; const cardNum=document.getElementById('cardNumber').textContent; const msg=encodeURIComponent("هلا والله\n\nفزت بـ "+prize+" من هدية اليوم\nرقم البطاقة: "+cardNum+"\n\nأبي أستلم هديتي\nشكراً"); .href='https://wa.me/'+STORE_WHATSAPP+'?text='+msg; } const confettiCanvas=document.getElementById('confettiCanvas'); const cCtx=confettiCanvas.getContext('2d'); let confettiParticles=[]; function resizeConfetti(){confettiCanvas.width=window.innerWidth;confettiCanvas.height=window.innerHeight} window.addEventListener('resize',resizeConfetti);resizeConfetti(); function fireConfetti(){ const colors=['#7B2DFF','#A855F7','#FF6A00','#FF8C1A','#22C55E','#fff']; for(let i=0;i<100;i++){ confettiParticles.push({x:window.innerWidth/2,y:window.innerHeight/2,vx:(Math.random()-0.5)*14,vy:(Math.random()-1.5)*14,size:Math.random()*5+2,color:colors[Math.floor(Math.random()*colors.length)],rotation:Math.random()*360,rotSpeed:(Math.random()-0.5)*8,gravity:0.22,drag:0.98,life:1}); } animateConfetti(); } function animateConfetti(){ if(confettiParticles.length===0){cCtx.clearRect(0,0,confettiCanvas.width,confettiCanvas.height);return} cCtx.clearRect(0,0,confettiCanvas.width,confettiCanvas.height); confettiParticles.forEach((p,i)=>{ p.x+=p.vx;p.y+=p.vy;p.vy+=p.gravity;p.vx*=p.drag;p.vy*=p.drag; p.rotation+=p.rotSpeed;p.life-=0.009; cCtx.save();cCtx.translate(p.x,p.y);cCtx.rotate(p.rotation*Math.PI/180); cCtx.fillStyle=p.color;cCtx.globalAlpha=Math.max(0,p.life); cCtx.fillRect(-p.size/2,-p.size/2,p.size,p.size); cCtx.restore(); if(p.life<=0||p.y>window.innerHeight+50)confettiParticles.splice(i,1); }); requestAnimationFrame(animateConfetti); } }, 0); })();