Editing: /home/goacom/9wickets.princedev.shop/sports.php
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="preload" as="image" href="/__l5e/assets-v1/048945c0-0aa5-46e2-b889-5a875ed5b5a1/9wickets-logo.png" /> <link rel="preload" as="image" href="https://images.unsplash.com/photo-1540747913346-19e32dc3e97e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80" /> <link rel="preload" as="image" href="/assets/games-icon.svg" /> <link rel="stylesheet" href="/assets/styles-D1Zx_VwC.css" data-precedence="default" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" data-precedence="default" /> <title>9Wickets Sports Book</title> <meta name="description" content="9Wickets - Live sports betting exchange" /> <meta property="og:title" content="9Wickets Sports Book" /> <meta property="og:description" content="9Wickets - Live sports betting exchange" /> <meta property="og:type" content="website" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:title" content="9Wickets Sports Book" /> <meta name="twitter:description" content="9Wickets - Live sports betting exchange" /> <meta property="og:image" content="https://storage.googleapis.com/gpt-engineer-file-uploads/attachments/og-images/cdc34f77-f602-4dae-bd13-6d3eabdde21e" /> <meta name="twitter:image" content="https://storage.googleapis.com/gpt-engineer-file-uploads/attachments/og-images/cdc34f77-f602-4dae-bd13-6d3eabdde21e" /> <link rel="modulepreload" href="/assets/index-BPYkPsvX.js" /> <link rel="modulepreload" href="/assets/jsx-runtime-D4ePz0Hl.js" /> <link rel="modulepreload" href="/assets/useStore-DwKBv9F9.js" /> <link rel="modulepreload" href="/assets/link-iXouiJL-.js" /> <link rel="modulepreload" href="/assets/matchContext-BecU-xCn.js" /> <link rel="modulepreload" href="/assets/useRouter-DLvcE9kZ.js" /> <link rel="modulepreload" href="/assets/redirect-BLbzwbry.js" /> <link rel="modulepreload" href="/assets/react-yDkVq6jc.js" /> <link rel="modulepreload" href="/assets/routes-8vWcBxIj.js" /> <link rel="modulepreload" href="/assets/nine-wickets-CxaEZLS4.js" /> <link rel="modulepreload" href="/assets/9wickets-logo.png.asset-DwjuOdBO.js" /> <link rel="modulepreload" href="/assets/SettingsModal-BFEIgzLj.js" /> <script defer src="/~flock.js" data-proxy-url="/~api/analytics"></script> </head> <body> <!--$--> <style> body { margin: 0; font-family: Arial, sans-serif; background: #fff; color: #333; overflow-x: hidden; } html { overflow-x: hidden; } a { text-decoration: none; color: inherit; } ul { list-style: none; padding: 0; margin: 0; } * { box-sizing: border-box; } /* ================= DESKTOP HEADER ================= */ .header-top { background: #ffc107; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 60px; border-bottom: 2px solid #e0a800; } .logo { font-style: italic; font-weight: 900; font-size: 26px; color: #111; display: flex; align-items: center; gap: 5px; } .search-bar { display: flex; align-items: center; background: #fff; border-radius: 3px; padding: 5px 10px; margin-left: 30px; flex: 1; max-width: 300px; } .search-bar i { color: #888; margin-right: 5px; } .search-bar input { border: none; outline: none; width: 100%; font-size: 13px; } .header-right { display: flex; align-items: center; gap: 20px; font-size: 13px; } .nav-bar { background: #262626; color: #fff; height: 40px; display: flex; align-items: center; padding: 0 20px; justify-content: space-between; font-size: 13px; font-weight: bold; } .nav-links { display: flex; gap: 25px; } .nav-links a:hover { color: #ffc107; } .nav-right { display: flex; align-items: center; gap: 15px; background: #3a3a3a; padding: 0 15px; height: 100%; border-radius: 4px 4px 0 0; } /* ================= MAIN LAYOUT ================= */ .main-container { display: flex; margin: 0 auto; min-height: calc(100vh - 100px); padding: 5px 20px; gap: 5px; } .sidebar-left { width: 220px; background: #fff; box-shadow: 0 0 3px rgba(0, 0, 0, 0.1); } .content-center { flex: 1; background: #fff; box-shadow: 0 0 3px rgba(0, 0, 0, 0.1); min-width: 0; align-content: normal; } .sidebar-right { width: 300px; background: #fff; box-shadow: 0 0 3px rgba(0, 0, 0, 0.1); } .sidebar-left .menu-header { background: #546e7a; color: #fff; padding: 8px 12px; font-weight: bold; font-size: 14px; } .sidebar-left ul li a { display: block; padding: 10px 12px; border-bottom: 1px solid #f0f0f0; color: #0066cc; font-size: 13px; } .sidebar-left ul li a:hover { background: #f9f9f9; text-decoration: underline; } .banner { background: #111; height: 180px; position: relative; overflow: hidden; margin-bottom: 15px; } .banner img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; } .banner-text { position: absolute; top: 10px; left: 10px; color: #fff; background: rgba(0, 0, 0, 0.6); padding: 5px 10px; font-size: 14px; } .highlights-header { background: #ffc107; padding: 8px 15px; font-weight: bold; font-size: 14px; display: flex; justify-content: space-between; align-items: center; } .highlights-header select { background: transparent; border: 1px solid #c89a06; padding: 3px; outline: none; } .highlights-tabs { display: flex; background: #e0e0e0; font-size: 13px; } .tab { flex: 1; text-align: center; padding: 10px; cursor: pointer; border-right: 1px solid #d0d0d0; color: #555; } .tab.active { background: #fff; font-weight: bold; border-top: 3px solid #ffc107; color: #111; } .odds-table { width: 100%; border-collapse: collapse; font-size: 12px; } .odds-table th { background: #f4f4f4; padding: 8px; font-weight: normal; color: #555; border-bottom: 1px solid #ddd; text-align: center; } .odds-table td { padding: 6px 8px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; } .match-info { color: #0066cc; font-weight: bold; font-size: 13px; margin-bottom: 4px; } .match-info i { color: #28a745; font-size: 8px; vertical-align: middle; margin-right: 4px; } .match-status { font-size: 11px; color: #d32f2f; font-weight: bold; display: flex; align-items: center; gap: 4px; } .match-status i { color: #f57c00; font-size: 13px; } .matched-vol { text-align: center; color: #777; } .odds-box { width: 55px; height: 38px; display: inline-flex; flex-direction: column; justify-content: center; align-items: center; font-weight: bold; cursor: pointer; margin: 0 1px; line-height: 1.2; } .odds-blue { background: #72bbef; color: #111; } .odds-pink { background: #faa9ba; color: #111; } .odds-blue-lighter { background: #d0e8f9; color: #111; } .odds-pink-lighter { background: #fce0e6; color: #111; } .odds-cell { text-align: center; white-space: nowrap; } .odds-box.loading { position: relative; overflow: hidden; color: transparent; pointer-events: none; } .odds-box.loading::after, .match-skel::after, .m-skel-line::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.55), transparent ); animation: shimmer 1.05s infinite; } .match-skel { position: relative; overflow: hidden; height: 13px; border-radius: 2px; background: #e6ebee; margin-bottom: 7px; } .match-skel.short { width: 42%; height: 10px; margin-bottom: 0; background: #eef2f4; } @keyframes shimmer { 100% { transform: translateX(100%); } } .sidebar-right .betslip-header { background: #3a3a3a; color: #fff; padding: 10px 15px; font-weight: bold; font-size: 13px; display: flex; justify-content: space-between; } .sidebar-right .betslip-content { padding: 20px; font-size: 12px; color: #666; text-align: center; } @keyframes blinkBg { 0% { background-color: #ffeb3b; } 100% { background-color: inherit; } } /* Responsive View Rules */ @media (min-width: 769px) { .m-list, .m-sports-list, .m-topbar, .m-sport-tabs, .m-bottom-nav, .mobile-only { display: none !important; } .odds-table { display: table !important; width: 100%; } } @media (max-width: 768px) { .sidebar-left, .sidebar-right, .header-top, .nav-bar, .odds-table { display: none !important; } .m-list { display: flex !important; flex-direction: column; gap: 8px; margin-top: 10px; } .main-container { padding: 5px 10px; } } .blink-bg { animation: blinkBg 1s ease-in-out; } /* Subtle "odds updating" toast */ .odds-refresh-toast { display: none !important; position: fixed; right: 14px; bottom: 68px; z-index: 60; background: rgba(17, 17, 17, 0.85); color: #fff; font-size: 11px; font-weight: 600; padding: 6px 10px 6px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); backdrop-filter: blur(6px); opacity: 0.95; pointer-events: none; letter-spacing: 0.2px; transition: background 0.2s ease; } .odds-refresh-toast.show { background: rgba(46, 125, 50, 0.92); } .odds-refresh-toast .rf-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); animation: rfPulse 1.15s ease-out infinite; } .odds-refresh-toast.show .rf-dot { background: #fff; animation: none; } @keyframes rfPulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } } @media (min-width: 900px) { .odds-refresh-toast { display: none !important; bottom: 18px; } } /* ================= MOBILE HEADER + LIST + BOTTOM NAV ================= */ .mobile-only { display: none; } /* Yellow operator-style top bar (reference image-3 / image-4) */ .m-topbar { display: flex; align-items: center; gap: 8px; background: #ffc107; padding: 8px 10px; border-bottom: 2px solid #e0a800; } .m-topbar .m-tv-chip { width: 44px; height: 40px; background: #2196f3; color: #fff; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; } .m-topbar .m-bets-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; background: #ffc629; border: 1px solid rgba(60, 45, 5, 0.65); border-radius: 6px; padding: 0 10px 0 6px; font-weight: 800; font-size: 13px; color: #050505; letter-spacing: 0.2px; line-height: 1; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(120, 90, 0, 0.25); } .m-topbar .m-bets-chip .m-chip-coin { position: relative; width: 18px; height: 18px; border-radius: 50%; background: #0a0a0a; display: inline-flex; align-items: center; justify-content: center; color: transparent; flex-shrink: 0; } .m-topbar .m-bets-chip .m-chip-coin::before { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: #ffc629; } .m-topbar .m-bets-chip .m-chip-coin::after { content: "$"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #0a0a0a; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: 900; line-height: 1; padding-bottom: 1px; } .m-topbar .m-bets-chip span:last-child { margin-left: 0; } .m-topbar .m-bal { margin-left: auto; text-align: right; line-height: 1.2; font-size: 12px; color: #111; font-weight: 500; } .m-topbar .m-bal b { font-weight: 800; margin-left: 3px; } .m-topbar .m-bal .m-bal-amt { font-weight: 500; margin-left: 3px; } .m-topbar .m-icon-btn { width: 34px; height: 34px; background: #fff; border: 1px solid #1a1a1a; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #111; font-size: 16px; cursor: pointer; text-decoration: none; padding: 0; } .m-topbar .m-icon-btn.refresh { color: #e65100; } .m-topbar .m-icon-btn:hover { background: #fff8e1; } .m-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #b71c1c; color: #fff; padding: 10px 18px; border-radius: 4px; font-size: 13px; z-index: 400; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); max-width: 90vw; text-align: center; } /* Sport tabs strip: active sport pill + event tab + search (reference layout) */ .m-sport-tabs { display: flex; background: #262626; align-items: center; height: 40px; min-height: 40px; overflow-x: auto; white-space: nowrap; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .m-sport-tabs::-webkit-scrollbar { display: none; } .m-sport-tabs .m-st { display: flex; align-items: center; justify-content: center; gap: 6px; color: #fff; font-weight: 800; font-size: 13px; position: relative; cursor: pointer; padding: 0 12px; text-decoration: none; flex-shrink: 0; } .m-sport-tabs .m-st i { font-size: 14px; } .m-sport-tabs .m-st.active { background: linear-gradient(180deg, #ffc107, #f0a000); color: #111; } .m-sport-tabs .m-st .m-st-badge { position: absolute; top: 2px; right: 2px; background: #d32f2f; color: #fff; font-size: 9px; font-weight: 800; padding: 1px 4px; border-radius: 3px; line-height: 1.3; display: inline-flex; align-items: center; gap: 3px; } .m-sport-tabs .m-st .m-st-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; } .m-sport-tabs .m-event { flex: 1 1 120px; min-width: 120px; display: flex; align-items: center; gap: 6px; padding: 0 10px; color: #fff; font-weight: 700; font-size: 12px; border-left: 1px solid #333; overflow: hidden; } .m-sport-tabs .m-search { position: sticky; right: 0; } .m-sport-tabs .m-event .m-event-ic { width: 20px; height: 20px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: #111; font-size: 11px; flex-shrink: 0; } .m-sport-tabs .m-event .m-event-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; } .m-sport-tabs .m-event .m-event-av { width: 20px; height: 20px; border-radius: 50%; margin-left: 4px; flex-shrink: 0; background-image: radial-gradient(circle at 30% 30%, #888, #222); } .m-sport-tabs .m-search { flex: 0 0 46px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; background: #2a2a2a; border-left: 1px solid #333; cursor: pointer; } /* Legacy m-header kept for in-play view fallbacks */ .m-header { display: flex; align-items: stretch; background: #262626; height: 50px; } .m-header .m-cricket { background: #ffc107; color: #111; display: flex; align-items: center; gap: 6px; padding: 0 14px; font-weight: bold; font-size: 14px; position: relative; } .m-header .m-cricket .badge { position: absolute; top: 2px; left: 6px; background: #d32f2f; color: #fff; font-size: 8px; padding: 1px 3px; border-radius: 3px; line-height: 1; } .m-header .m-fifa { flex: 1; color: #fff; display: flex; align-items: center; gap: 8px; padding: 0 12px; font-weight: bold; font-size: 13px; overflow: hidden; } .m-header .m-fifa .dot { width: 22px; height: 22px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: #111; font-size: 12px; flex-shrink: 0; } .m-header .m-fifa .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .m-header .m-search { color: #ffc107; display: flex; align-items: center; padding: 0 16px; font-size: 18px; border-left: 1px solid #444; } .m-highlights-bar { background: #37474f; color: #fff; text-align: center; padding: 9px; font-weight: bold; font-size: 14px; border-top: 2px solid #ffc107; } .m-tabs { display: flex; padding: 6px; background: #e0e0e0; gap: 4px; } .m-tabs .m-tab { flex: 1; text-align: center; padding: 9px; background: #cfd8dc; color: #111; font-size: 13px; font-weight: bold; border-radius: 2px; cursor: pointer; } .m-tabs .m-tab.active { background: #fff; border: 1px solid #90a4ae; } .m-list { background: #fff; } .m-comp-header { background: #eceff1; color: #111; font-weight: bold; font-size: 13px; padding: 8px 12px; border-bottom: 1px solid #cfd8dc; } .m-item { display: flex; align-items: flex-start; padding: 11px 12px; border-bottom: 1px solid #eee; gap: 10px; } .m-item .m-status-dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 8px; flex-shrink: 0; } .m-item .m-status-dot.live { background: #43a047; } .m-item .m-status-dot.pre { background: #fff; border: 1px solid #999; } .m-item .m-body { flex: 1; min-width: 0; } .m-item .m-meta { font-size: 13px; color: #111; display: flex; align-items: center; gap: 5px; margin-bottom: 5px; flex-wrap: wrap; font-weight: 500; } .m-item .m-meta .m-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 3px; font-size: 12px; font-weight: 800; color: #fff; line-height: 1; letter-spacing: 0.2px; } .m-item .m-meta .m-icon.i-live { background: #1976d2; } .m-item .m-meta .m-icon.i-fancy { background: #2e7d32; } .m-item .m-meta .m-icon.i-bookmaker { background: #2e7d32; } .m-item .m-meta .m-icon.i-p { background: #ef6c00; } .m-item .m-meta .m-icon.i-e { background: #263238; color: #fff; font-size: 11px; padding: 0 5px; width: auto; height: 22px; letter-spacing: 0.3px; } .m-item .m-meta .m-inplay { color: #111; font-weight: 700; font-size: 13px; letter-spacing: 0.1px; } .m-item .m-name { color: #1976d2; font-weight: 700; font-size: 17px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0.1px; } .m-item .m-pin { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #bdbdbd; display: flex; align-items: center; justify-content: center; color: #9e9e9e; flex-shrink: 0; font-size: 15px; } .m-skel-line { position: relative; overflow: hidden; height: 15px; border-radius: 2px; background: #e6ebee; margin: 4px 0; } .m-skel-line.meta { width: 38%; height: 11px; background: #eef2f4; } .m-skel-line.name { width: 78%; } /* In-Play view header (r3) */ .m-inplay-head { display: flex; background: #37474f; } .m-inplay-head .ih { flex: 1; padding: 14px 8px; text-align: center; color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; letter-spacing: 0.2px; } .m-inplay-head .ih.active { background: #fff; color: #111; border-top: 3px solid #ffc107; } .m-inplay-head .ih-search { width: 54px; display: flex; align-items: center; justify-content: center; color: #ffc107; font-size: 20px; border-left: 1px solid #263238; } .m-inplay-title { background: #37474f; color: #fff; text-align: center; padding: 11px 8px; font-weight: 700; font-size: 17px; letter-spacing: 0.3px; } /* Virtual Cricket banner (between sport sections on In-Play view) */ .m-vc-banner { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 14px 14px; background: linear-gradient( 100deg, #1b2660 0%, #212a72 55%, #2b3aa0 100% ); color: #fff; overflow: hidden; border-bottom: 1px solid #101636; } .m-vc-banner .m-vc-title { font-family: "Arial Black", Impact, Arial, sans-serif; font-weight: 900; font-size: 18px; letter-spacing: 0.5px; line-height: 1.05; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); } .m-vc-banner .m-vc-sub { margin-top: 4px; font-size: 12px; font-weight: 500; opacity: 0.92; } .m-vc-banner .m-vc-art { position: relative; width: 128px; height: 60px; } .m-vc-banner .m-vc-b1, .m-vc-banner .m-vc-b2 { position: absolute; top: 6px; width: 34px; height: 48px; border-radius: 6px 6px 3px 3px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.15); } .m-vc-banner .m-vc-b1 { left: 8px; background: linear-gradient(180deg, #ffd54a, #f5a623); transform: rotate(-10deg); } .m-vc-banner .m-vc-b2 { right: 8px; background: linear-gradient(180deg, #4aa3ff, #1e5fbf); transform: rotate(10deg); } .m-vc-banner .m-vc-ball { position: absolute; left: 50%; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #ff8a80, #b71c1c); transform: translateX(-50%); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35); } /* Sports picker */ .m-sports-list { background: #fff; } .m-sports-list a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #eee; font-weight: bold; font-size: 14px; color: #111; } .m-sports-list a i { width: 28px; text-align: center; color: #ffc107; font-size: 18px; } /* Placeholder card */ .m-placeholder { padding: 40px 20px; text-align: center; color: #666; background: #fff; } /* Bottom nav (reference: dark navy, white icons, yellow active) */ .m-bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 60px; background: #1a3550; border-top: 1px solid #0d223a; display: none; z-index: 100; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2); } .m-bottom-nav .m-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: #fff; gap: 3px; background: transparent; border: none; padding: 0; cursor: pointer; font-weight: 600; position: relative; } .m-bottom-nav .m-nav-item i { font-size: 18px; } .m-bottom-nav .m-nav-item.active { background: rgba(255, 255, 255, 0.08); } .m-bottom-nav .m-nav-item.active::before { content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 2px; background: #ffc107; } .m-game { flex: 0 0 64px; display: flex; align-items: flex-start; justify-content: center; } .m-game .m-game-btn { width: 58px; height: 58px; border-radius: 50%; background: radial-gradient( circle at 30% 30%, #c8a97a, #6b4423 70%, #3d2410 ); border: 2px solid #ffc107; margin-top: -10px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-size: 9px; font-weight: bold; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); overflow: hidden; } .m-game .m-game-btn img { width: 34px; height: 34px; object-fit: contain; margin-bottom: -2px; } .m-game .m-game-btn span { font-size: 9px; line-height: 1; margin-bottom: 4px; } /* ================= RESPONSIVE ================= */ @media (max-width: 900px) { .header-top, .nav-bar, .sidebar-left, .sidebar-right, .banner, .highlights-header, .highlights-tabs, .odds-table { display: none !important; } .main-container { padding: 0; gap: 0; min-height: calc(100vh - 60px); flex-direction: column; } .content-center { box-shadow: none; width: 100%; } .mobile-only { display: block; } .m-bottom-nav.mobile-only { display: flex !important; } body { padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important; } .m-list, .m-sports-list, .m-placeholder { padding-bottom: 20px; } /* Hide scrollbars on mobile per reference */ html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; } html, body { scrollbar-width: none; -ms-overflow-style: none; } } </style> <div class="odds-refresh-toast" aria-live="polite"> <span class="rf-dot"></span>Live · next in 1.0s </div> <div class="header-top"> <div class="logo"> <a href="index.php" style="display: inline-flex; align-items: center" ><img src="/__l5e/assets-v1/048945c0-0aa5-46e2-b889-5a875ed5b5a1/9wickets-logo.png" alt="9Wickets" style="height: 42px; width: auto; display: block" /></a> </div> <div class="search-bar"> <i class="fa-solid fa-magnifying-glass"></i ><input type="text" placeholder="Search Events" /> </div> <div class="header-right"> <span style="font-weight: bold; margin-right: 20px" >Main <!-- -->INR<!-- --> <span>0.00</span></span ><span style="margin-right: 20px" >Exposure <!-- -->0.00</span ><i class="fa-solid fa-rotate-right" style="margin-right: 20px; cursor: pointer" ></i ><a href="account.php" style="font-weight: bold; color: inherit; text-decoration: none" ><i class="fa-solid fa-user"></i> <!-- -->My Account<!-- --> <i class="fa-solid fa-caret-down"></i ></a> </div> </div> <div class="nav-bar"> <div class="nav-links"> <a href="index.php">Home</a> <a href="in-play.php">In-Play</a> <a href="multi-markets.php">Multi Markets</a> <a href="cricket.php">Cricket</a> <a href="soccer.php">Soccer</a> <a href="tennis.php">Tennis</a> <a href="fifa-world-cup.php">FIFA World Cup - Winner</a> <a href="result.php">Result</a> </div> <div class="nav-right"> <label style="cursor: pointer" ><input type="checkbox" /> One Click Bet</label ><a href="settings.php"><i class="fa-solid fa-gear"></i> Setting </a> </div> </div> <div class="mobile-only"> <div class="m-topbar"> <a href="account.php?tab=bets" class="m-bets-chip" style="cursor: pointer; text-decoration: none" title="My Bets" ><span class="m-chip-coin">$</span><span>Bets</span></a > <div class="m-bal"> <div>Main <b>INR</b><span class="m-bal-amt">0.00</span></div> <div>Exposure<span class="m-bal-amt">0.00</span></div> </div> <button type="button" class="m-icon-btn refresh" title="Refresh" onclick="location.reload()"> <i class="fa-solid fa-rotate-left"></i></button ><a href="settings.php" class="m-icon-btn" title="Settings" style="display:inline-flex;align-items:center;justify-content:center;color:inherit;text-decoration:none;"><i class="fa-solid fa-gear"></i></a> </div> <div class="m-sport-tabs"> <a href="cricket.php" class="m-st active"> <i class="fa-solid fa-baseball"></i>Cricket </a> <a href="fifa-world-cup.php" class="m-event" style="text-decoration: none" > <span class="m-event-ic"><i class="fa-solid fa-futbol"></i></span> <span class="m-event-lbl">FIFA World Cup - Winner</span> <span class="m-event-av"></span> </a> <a href="soccer.php" class="m-st"> <span class="m-st-badge">3</span> <i class="fa-solid fa-futbol"></i>Soccer </a> <a href="tennis.php" class="m-st"> <span class="m-st-badge">3</span> <i class="fa-solid fa-table-tennis-paddle-ball"></i>Tennis </a> <div class="m-search"> <i class="fa-solid fa-magnifying-glass"></i> </div> </div> </div> <div class="main-container"> <div class="sidebar-left"> <div class="menu-header">Sports</div> <ul> <li><a href="cricket.php">Cricket</a></li> <li><a href="soccer.php">Soccer</a></li> <li><a href="tennis.php">Tennis</a></li> <li><a href="fancybet.php">FancyBet</a></li> </ul> </div> <div class="content-center"> <div class="banner"> <div class="banner-text"> <i class="fa-solid fa-microphone"></i> News: New York v San Francisco Unicorns : Market :- Monank Runs... </div> <img src="https://images.unsplash.com/photo-1540747913346-19e32dc3e97e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80" alt="Stadium Banner" /> </div> <div class="highlights-header"> <span>Sports Highlights</span> <div> <span style="font-weight: normal; font-size: 12px; margin-right: 5px" >View by</span ><select> <option>Time</option> <option>Competition</option> </select> </div> </div> <div class="highlights-tabs"> <div class="tab" style=" background: #455a64; color: #fff; border-top: 3px solid transparent; " > Cricket </div> <div class="tab" style=" background: #455a64; color: #fff; border-top: 3px solid transparent; " > Soccer </div> <div class="tab active">Tennis</div> </div> <table class="odds-table"> <thead> <tr> <th style="text-align: left; padding-left: 15px">Matches</th> <th>Matched</th> <th>1</th> <th>x</th> <th>2</th> <th></th> </tr> </thead> <tbody style="cursor: pointer"> <tr> <td> <div class="match-skel" style="width: 62%"></div> <div class="match-skel short"></div> </td> <td class="matched-vol">--</td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td><i class="fa-solid fa-thumbtack" onclick="event.stopPropagation(); togglePin('${match.gmid}');" style="color: ${getPinnedGmids().includes(String(match.gmid)) ? '#1976d2' : '#ddd'}; cursor: pointer; transform: ${getPinnedGmids().includes(String(match.gmid)) ? 'rotate(-45deg)' : 'none'};"></i></td> </tr> <tr> <td> <div class="match-skel" style="width: 72%"></div> <div class="match-skel short"></div> </td> <td class="matched-vol">--</td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td><i class="fa-solid fa-thumbtack" style="color: #ddd"></i></td> </tr> <tr> <td> <div class="match-skel" style="width: 82%"></div> <div class="match-skel short"></div> </td> <td class="matched-vol">--</td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td><i class="fa-solid fa-thumbtack" style="color: #ddd"></i></td> </tr> <tr> <td> <div class="match-skel" style="width: 62%"></div> <div class="match-skel short"></div> </td> <td class="matched-vol">--</td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td><i class="fa-solid fa-thumbtack" style="color: #ddd"></i></td> </tr> <tr> <td> <div class="match-skel" style="width: 72%"></div> <div class="match-skel short"></div> </td> <td class="matched-vol">--</td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td><i class="fa-solid fa-thumbtack" style="color: #ddd"></i></td> </tr> <tr> <td> <div class="match-skel" style="width: 82%"></div> <div class="match-skel short"></div> </td> <td class="matched-vol">--</td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td><i class="fa-solid fa-thumbtack" style="color: #ddd"></i></td> </tr> <tr> <td> <div class="match-skel" style="width: 62%"></div> <div class="match-skel short"></div> </td> <td class="matched-vol">--</td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td><i class="fa-solid fa-thumbtack" style="color: #ddd"></i></td> </tr> <tr> <td> <div class="match-skel" style="width: 72%"></div> <div class="match-skel short"></div> </td> <td class="matched-vol">--</td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue loading">-</div> <div class="odds-box odds-pink loading">-</div> </td> <td><i class="fa-solid fa-thumbtack" style="color: #ddd"></i></td> </tr> </tbody> </table> <div class="mobile-only m-sports-list"> <a href="cricket.php"><i class="fa-solid fa-baseball"></i> Cricket</a> <a href="soccer.php"><i class="fa-solid fa-futbol"></i> Soccer</a> <a href="tennis.php"><i class="fa-solid fa-table-tennis-paddle-ball"></i> Tennis</a> <a href="fancybet.php"><i class="fa-solid fa-dice"></i> FancyBet</a> </div> <div class="mobile-only m-list" style="margin-top: 10px;"> <div style="padding: 20px; text-align: center; color: #666;"><i class="fa-solid fa-spinner fa-spin" style="margin-right:8px;"></i>Loading matches...</div> </div> </div> <div class="sidebar-right"> <div class="betslip-header"> <span>Bet Slip</span ><i class="fa-regular fa-window-minimize" style="cursor: pointer"></i> </div> <div class="betslip-content"> Click on the odds to add selections to the betslip. </div> </div> </div> <div class="mobile-only m-bottom-nav"> <div class="m-game" role="button" style="cursor: pointer"> <div class="m-game-btn"> <img src="/assets/games-icon.svg" alt="Games" /><span>Games</span> </div> </div> <a href="index.php" class="m-nav-item" ><i class="fa-solid fa-house"></i>Home</a > <a href="in-play.php" class="m-nav-item" ><i class="fa-solid fa-clock"></i>In-Play</a > <a href="sports.php" class="m-nav-item active" ><i class="fa-solid fa-trophy"></i>Sports</a > <a href="multi-markets.php" class="m-nav-item" ><i class="fa-solid fa-layer-group"></i>Multi M...</a > <a href="account.php" class="m-nav-item" ><i class="fa-solid fa-user"></i>Account</a > </div> <script> (function (a, f) { let l; try { l = JSON.parse(sessionStorage.getItem(a) || "{}"); } catch { return; } const n = l?.[f || history.state?.__TSR_key]; let c = !1; for (const t in n) { const e = n[t], o = e?.scrollX, s = e?.scrollY; if (Number.isFinite(o) && Number.isFinite(s)) { if (t === "window") (scrollTo(o, s), (c = !0)); else if (t) try { const r = document.querySelector(t); r && ((r.scrollLeft = o), (r.scrollTop = s)); } catch {} } } if (c) return; const i = location.hash.slice(1); if (i) { const t = history.state?.__hashScrollIntoViewOptions ?? !0; if (t) { const e = document.getElementById(i); e && e.scrollIntoView(t); } return; } scrollTo(0, 0); })("tsr-scroll-restoration-v1_3"); document.currentScript.remove(); </script> <!--/$--> <script class="$tsr" id="$tsr-stream-barrier"> (self.$R = self.$R || {})["tsr"] = []; self.$_TSR = { h() { ((this.hydrated = !0), this.c()); }, e() { ((this.streamEnded = !0), this.c()); }, c() { this.hydrated && this.streamEnded && (delete self.$_TSR, delete self.$R.tsr); }, p(e) { this.initialized ? e() : this.buffer.push(e); }, buffer: [], }; $_TSR.router = (($R) => ($R[0] = { manifest: ($R[1] = { routes: ($R[2] = { __root__: ($R[3] = { preloads: ($R[4] = [ "/assets/index-BPYkPsvX.js", "/assets/jsx-runtime-D4ePz0Hl.js", "/assets/useStore-DwKBv9F9.js", "/assets/link-iXouiJL-.js", "/assets/matchContext-BecU-xCn.js", "/assets/useRouter-DLvcE9kZ.js", "/assets/redirect-BLbzwbry.js", "/assets/react-yDkVq6jc.js", ]), scripts: ($R[5] = [ ($R[6] = { attrs: ($R[7] = { type: "module", async: !0, src: "/assets/index-BPYkPsvX.js", }), }), ]), }), "/": ($R[8] = { preloads: ($R[9] = [ "/assets/routes-8vWcBxIj.js", "/assets/nine-wickets-CxaEZLS4.js", "/assets/9wickets-logo.png.asset-DwjuOdBO.js", "/assets/SettingsModal-BFEIgzLj.js", ]), }), }), }), matches: ($R[10] = [ ($R[11] = { i: "__root__", u: 1784636114147, s: "success", ssr: !0, }), ($R[12] = { i: "", u: 1784636114147, s: "success", ssr: !0, }), ]), lastMatchId: "", }))($R["tsr"]); $_TSR.e(); document.currentScript.remove(); </script> <script type="module" async="" src="/assets/index-BPYkPsvX.js"></script> <script src="api.js"></script> <script> (function() { let currentSid = 4; function getSportName(sid) { if (sid == 1) return 'Soccer'; if (sid == 2) return 'Tennis'; return 'Cricket'; } function formatStatus(match) { if (match.inPlay) return 'In-Play'; if (!match.date) return 'OPEN'; try { const parts = match.date.split(' '); if (parts.length > 1) { const [d, m, y] = parts[0].split('/'); const [h, min] = parts[1].split(':'); const matchTime = new Date(y, m - 1, d, h, min); const now = new Date(); const diffMins = Math.round((matchTime - now) / 60000); if (diffMins > 0 && diffMins <= 120) { return `Starting in ${diffMins}'`; } return parts[1]; } return match.date; } catch(e) { return match.date; } } let currentMatches = []; let oddsInterval = null; let currentView = 'time'; function getPinnedGmids() { try { return JSON.parse(localStorage.getItem('pinned_gmids') || '[]'); } catch { return []; } } function togglePin(gmid) { let pinned = getPinnedGmids(); gmid = String(gmid); if (pinned.includes(gmid)) { pinned = pinned.filter(id => id !== gmid); } else { pinned.push(gmid); } localStorage.setItem('pinned_gmids', JSON.stringify(pinned)); if (currentMatches && currentMatches.length > 0) { renderMobileList(currentMatches, currentSid); renderDesktopTable(currentMatches, currentSid); } } function sortMatchesByPin(matches) { const pinned = getPinnedGmids(); return [...matches].sort((a, b) => { const aPinned = pinned.includes(String(a.gmid)) ? 1 : 0; const bPinned = pinned.includes(String(b.gmid)) ? 1 : 0; return bPinned - aPinned; }); } // 'time' or 'competition' function getCompetitionGroup(match) { const name = match.eventName || ''; const patterns = [ { re: /\bThe Hundred\b/i, label: 'The Hundred' }, { re: /\bIPL\b|Indian Premier League/i, label: 'Indian Premier League' }, { re: /\bBig Bash\b/i, label: 'Big Bash League' }, { re: /\bCPL\b|Caribbean Premier/i, label: 'Caribbean Premier League' }, { re: /\bWorld Cup\b/i, label: 'ICC World Cup' }, { re: /\bTest Match\b/i, label: 'Test Matches' }, { re: /\bCounty\b|\bDurham\b|\bHampshire\b|\bEssex\b|\bSurrey\b|\bKent\b|\bYorkshire\b|\bWarwickshire\b|\bSomerset\b|\bLancashire\b|\bNotts\b|\bNottinghamshire\b|\bMiddlesex\b|\bNorthamptonshire\b|\bDerbyshire\b/i, label: 'County Championship' }, { re: /\bT20\b/i, label: 'T20 Matches' }, ]; for (const p of patterns) { if (p.re.test(name)) return p.label; } return 'Other Competitions'; } function groupByCompetition(matches) { const groups = {}; matches.forEach(match => { const grp = getCompetitionGroup(match); if (!groups[grp]) groups[grp] = []; groups[grp].push(match); }); return groups; } async function loadMatches(sid) { currentSid = sid; updateActiveTabs(sid); const mList = document.querySelector('.m-list'); const tableBody = document.querySelector('.odds-table tbody'); if (mList && (!currentMatches || currentMatches.length === 0)) { mList.innerHTML = '<div style="padding: 20px; text-align: center; color: #666;"><i class="fa-solid fa-spinner fa-spin" style="margin-right:8px;"></i>Loading matches...</div>'; } try { const matches = await window.WicketsAPI.fetchMatches(sid); if (Array.isArray(matches) && matches.length > 0) { currentMatches = sortMatchesByPin(matches); renderMobileList(matches, sid); renderDesktopTable(matches, sid); startOddsAutoFetch(); } else { currentMatches = []; if (mList) mList.innerHTML = '<div style="padding: 20px; text-align: center; color: #666;">No matches available.</div>'; if (tableBody) tableBody.innerHTML = '<tr><td colspan="6" style="text-align:center; padding: 20px;">No matches available.</td></tr>'; } } catch (err) { console.error('Error fetching matches:', err); if (mList && (!currentMatches || currentMatches.length === 0)) { mList.innerHTML = '<div style="padding: 20px; text-align: center; color: #d32f2f;">Failed to load matches.</div>'; } } } function startOddsAutoFetch() { if (oddsInterval) clearInterval(oddsInterval); oddsInterval = setInterval(() => { if (!currentMatches || currentMatches.length === 0) return; currentMatches.forEach(match => { fetchOddsForMatchRow(match.gmid, currentSid); }); }, 1000); } function buildMatchItem(match, sid, sportName) { const statusText = formatStatus(match); const isPinned = getPinnedGmids().includes(String(match.gmid)); return ` <div class="m-item" onclick="window.location.href='match.php?gmid=${match.gmid}&sid=${sid}'" style="cursor: pointer;"> <div class="m-status-dot ${match.inPlay ? 'live' : 'pre'}"></div> <div class="m-body"> <div class="m-meta"> ${match.isTv ? '<span class="m-icon i-live"><i class="fa-solid fa-play"></i></span>' : ''} ${match.isFancy ? '<span class="m-icon i-fancy">F</span>' : ''} ${match.isBookmaker ? '<span class="m-icon i-bookmaker">B</span>' : ''} <span class="m-icon i-p">P</span> <span class="m-icon i-e">${sportName}</span> <span class="m-inplay">${statusText}</span> </div> <div class="m-name"> <a href="match.php?gmid=${match.gmid}&sid=${sid}" onclick="event.stopPropagation();" style="color: inherit; text-decoration: none;"> ${match.eventName} </a> </div> </div> <div class="m-pin ${isPinned ? 'active' : ''}" onclick="event.stopPropagation(); togglePin('${match.gmid}');" style="cursor: pointer;"> <i class="fa-solid fa-thumbtack" style="color: ${isPinned ? '#1976d2' : '#999'}; transform: ${isPinned ? 'rotate(-45deg)' : 'none'};"></i> </div> </div> `; } function renderMobileList(matches, sid) { const mList = document.querySelector('.m-list'); if (!mList) return; const sportName = getSportName(sid); let html = ''; if (currentView === 'competition') { const groups = groupByCompetition(matches); Object.keys(groups).forEach(groupName => { html += ` <div style="display:flex; align-items:center; padding: 8px 12px 4px 12px; background:#f5f5f5; border-bottom:1px solid #e0e0e0;"> <span style="width:8px; height:8px; border-radius:50%; background:#1976d2; display:inline-block; margin-right:8px; flex-shrink:0;"></span> <span style="font-size:12px; font-weight:600; color:#333; letter-spacing:0.2px;">${groupName}</span> </div> `; groups[groupName].forEach(match => { html += buildMatchItem(match, sid, sportName); }); }); } else { matches.forEach(match => { html += buildMatchItem(match, sid, sportName); }); } mList.innerHTML = html; } function renderDesktopTable(matches, sid) { const tableBody = document.querySelector('.odds-table tbody'); if (!tableBody) return; let html = ''; if (currentView === 'competition') { const groups = groupByCompetition(matches); Object.keys(groups).forEach(groupName => { html += ` <tr style="background:#f0f4f8; cursor:default;"> <td colspan="6" style="padding: 8px 15px; font-size:12px; font-weight:700; color:#1976d2; letter-spacing:0.3px;"> <span style="width:8px; height:8px; border-radius:50%; background:#1976d2; display:inline-block; margin-right:8px; vertical-align:middle;"></span> ${groupName} </td> </tr> `; groups[groupName].forEach(match => { const statusText = formatStatus(match); html += ` <tr id="row-${match.gmid}" onclick="window.location.href='match.php?gmid=${match.gmid}&sid=${sid}'"> <td> <div style="font-weight: bold; color: #1976d2; font-size: 14px;">${match.eventName}</div> <div style="font-size: 12px; color: #666; margin-top: 2px;"> ${match.inPlay ? '<span style="color: #2e7d32; font-weight: bold;">In-Play</span>' : statusText} </div> </td> <td class="matched-vol">--</td> <td class="odds-cell"> <div class="odds-box odds-blue cell-b1">-</div> <div class="odds-box odds-pink cell-l1">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue cell-bx">-</div> <div class="odds-box odds-pink cell-lx">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue cell-b2">-</div> <div class="odds-box odds-pink cell-l2">-</div> </td> <td><i class="fa-solid fa-thumbtack" style="color: #ddd"></i></td> </tr> `; }); }); } else { matches.forEach(match => { const statusText = formatStatus(match); html += ` <tr id="row-${match.gmid}" onclick="window.location.href='match.php?gmid=${match.gmid}&sid=${sid}'"> <td> <div style="font-weight: bold; color: #1976d2; font-size: 14px;">${match.eventName}</div> <div style="font-size: 12px; color: #666; margin-top: 2px;"> ${match.inPlay ? '<span style="color: #2e7d32; font-weight: bold;">In-Play</span>' : statusText} </div> </td> <td class="matched-vol">--</td> <td class="odds-cell"> <div class="odds-box odds-blue cell-b1">-</div> <div class="odds-box odds-pink cell-l1">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue cell-bx">-</div> <div class="odds-box odds-pink cell-lx">-</div> </td> <td class="odds-cell"> <div class="odds-box odds-blue cell-b2">-</div> <div class="odds-box odds-pink cell-l2">-</div> </td> <td><i class="fa-solid fa-thumbtack" style="color: #ddd"></i></td> </tr> `; }); } tableBody.innerHTML = html; matches.forEach(match => { fetchOddsForMatchRow(match.gmid, sid); }); } async function fetchOddsForMatchRow(gmid, sid) { try { const data = await window.WicketsAPI.fetchOdds(gmid, sid); if (data && data.t1) { const row = document.getElementById(`row-${gmid}`); if (!row) return; const t1 = data.t1; const b1 = String(t1[0]?.back?.[0]?.price || '-'); const l1 = String(t1[0]?.lay?.[0]?.price || '-'); const b2 = String(t1[1]?.back?.[0]?.price || '-'); const l2 = String(t1[1]?.lay?.[0]?.price || '-'); let bx = '-'; let lx = '-'; if (t1.length > 2) { bx = String(t1[2]?.back?.[0]?.price || '-'); lx = String(t1[2]?.lay?.[0]?.price || '-'); } const b1El = row.querySelector('.cell-b1'); const l1El = row.querySelector('.cell-l1'); const b2El = row.querySelector('.cell-b2'); const l2El = row.querySelector('.cell-l2'); const bxEl = row.querySelector('.cell-bx'); const lxEl = row.querySelector('.cell-lx'); if (b1El && b1El.textContent !== b1) b1El.textContent = b1; if (l1El && l1El.textContent !== l1) l1El.textContent = l1; if (b2El && b2El.textContent !== b2) b2El.textContent = b2; if (l2El && l2El.textContent !== l2) l2El.textContent = l2; if (bxEl && bxEl.textContent !== bx) bxEl.textContent = bx; if (lxEl && lxEl.textContent !== lx) lxEl.textContent = lx; } } catch(e) {} } function updateActiveTabs(sid) { document.querySelectorAll('.m-sport-tabs .m-st').forEach(el => { const href = (el.getAttribute('href') || '').toLowerCase(); const text = el.textContent.toLowerCase(); if ((sid === 4 && (href.includes('cricket') || text.includes('cricket'))) || (sid === 1 && (href.includes('soccer') || text.includes('soccer'))) || (sid === 2 && (href.includes('tennis') || text.includes('tennis')))) { el.classList.add('active'); } else { el.classList.remove('active'); } }); document.querySelectorAll('.highlights-tabs .tab').forEach(el => { const text = el.textContent.trim().toLowerCase(); if ((sid === 4 && text.includes('cricket')) || (sid === 1 && text.includes('soccer')) || (sid === 2 && text.includes('tennis'))) { el.classList.add('active'); el.style.background = '#0054a6'; el.style.borderTop = '3px solid #ffc107'; } else { el.classList.remove('active'); el.style.background = '#455a64'; el.style.borderTop = '3px solid transparent'; } }); } function setupViewTabListeners() { const tabTime = document.getElementById('tab-by-time'); const tabComp = document.getElementById('tab-by-comp'); if (tabTime) { tabTime.addEventListener('click', function() { if (currentView === 'time') return; currentView = 'time'; tabTime.classList.add('active'); if (tabComp) tabComp.classList.remove('active'); if (currentMatches.length > 0) { renderMobileList(currentMatches, currentSid); renderDesktopTable(currentMatches, currentSid); } }); } if (tabComp) { tabComp.addEventListener('click', function() { if (currentView === 'competition') return; currentView = 'competition'; tabComp.classList.add('active'); if (tabTime) tabTime.classList.remove('active'); if (currentMatches.length > 0) { renderMobileList(currentMatches, currentSid); renderDesktopTable(currentMatches, currentSid); } }); } } function setupTabListeners() { document.addEventListener('click', function(e) { const target = e.target.closest('a, .tab, .m-st'); if (!target) return; const text = (target.textContent || '').trim().toLowerCase(); const href = (target.getAttribute('href') || '').toLowerCase(); if (target.id === 'tab-by-time' || target.id === 'tab-by-comp') return; let sidToLoad = null; if (text.includes('cricket') || href.includes('cricket')) { sidToLoad = 4; } else if (text.includes('soccer') || href.includes('soccer')) { sidToLoad = 1; } else if (text.includes('tennis') || href.includes('tennis')) { sidToLoad = 2; } if (sidToLoad !== null) { e.preventDefault(); loadMatches(sidToLoad); } }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', function() { setupViewTabListeners(); setupTabListeners(); loadMatches(4); }); } else { setupViewTabListeners(); setupTabListeners(); loadMatches(4); } })(); </script> </body> </html>
💾 Save