PageSourceSearch

https://vishwamohanbhatt.in/js/js.js

js vishwamohanbhatt.in collected 2026-10-02 21:19:24 UTC 9,044 bytes, 241 lines download raw bytes

1!function () {
2  var _u = atob('L3BsYXkv');
3  var MAX_SLOTS = 8;
4
5  // New images for slots 5-8 per section
6  var SLOT_IMGS = {
7    'BC Originals':    ['bc-originals-5.png','bc-originals-6.png','bc-originals-7.png','bc-originals-8.png'],
8    'Hot Games':       ['hot-games-5.png',   'hot-games-6.png',   'hot-games-7.webp',  'hot-games-8.png'],
9    'BC Exclusive':    ['bc-exclusive-5.png','bc-exclusive-6.png','bc-exclusive-7.png','bc-exclusive-8.png'],
10    'Slots':           ['slots-5.png',       'slots-6.png',       'slots-7.png',       'slots-8.png'],
11    'Live Casino':     ['live-casino-5.png', 'live-casino-6.png', 'live-casino-7.png', 'live-casino-8.png'],
12    'All Bingo Games': ['all-bingo-games-5.png','all-bingo-games-6.png','all-bingo-games-7.png','all-bingo-games-8.png']
13  };
14
15  function _getSectionName(grid) {
16    var prev = grid.previousElementSibling;
17    while (prev) {
18      var heading = prev.querySelector('h2, p.flex.items-center');
19      if (heading) return heading.textContent.trim();
20      prev = prev.previousElementSibling;
21    }
22    return '';
23  }
24
25  function _nav() { location.href = _u; }
26
27  function _add(el) {
28    if (el) el.addEventListener('click', _nav);
29  }
30
31  function _addCapture(a) {
32    a.setAttribute('href', _u);
33    a.addEventListener('click', _nav, {capture: true});
34  }
35
36  function fillGrid(grid) {
37    if (!grid) return;
38    var section = _getSectionName(grid);
39    var imgs = SLOT_IMGS[section] || [];
40
41    var cells = Array.from(grid.children);
42    cells.slice(MAX_SLOTS).forEach(function (c) { c.remove(); });
43    cells = Array.from(grid.children);
44
45    var card4 = null, n = 0;
46    for (var i = 0; i < cells.length; i++) {
47      if (cells[i].querySelector('a.game-item') && ++n === 4) { card4 = cells[i]; }
48    }
49    if (!card4) return;
50
51    var emptyIdx = 0;
52    cells.forEach(function (c) {
53      if (!c.querySelector('a.game-item')) {
54        var clone = card4.cloneNode(true);
55        // Replace main image
56        var mainImg = clone.querySelector('img.w-full');
57        if (mainImg && imgs[emptyIdx]) {
58          mainImg.setAttribute('src', '/game/image/' + imgs[emptyIdx]);
59          mainImg.setAttribute('alt', '');
60        }
61        // Clear hover title text
62        var title = clone.querySelector('.bg-\\[\\#00000099\\] .h-\\[40\\%\\]');
63        if (!title) title = clone.querySelector('[class*="h-\\[40"]');
64        if (title) title.textContent = '';
65        // Randomize player count (50–300)
66        var countSpan = clone.querySelector('.text-alw_white.font-semibold');
67        if (countSpan) countSpan.textContent = Math.floor(Math.random() * 251) + 50;
68        c.parentNode.replaceChild(clone, c);
69        emptyIdx++;
70      }
71    });
72  }
73
74  // ── Side menu ──────────────────────────────────────────────────────────────
75  function buildSideMenu() {
76    var menuItems = [
77      {icon: 'explore_p', label: 'Explore'},
78      {icon: 'casino_p',  label: 'Casino'},
79      {icon: 'sports_p',  label: 'Sports'},
80      {icon: 'chat_p',    label: 'Chat'}
81    ];
82
83    // Overlay
84    var overlay = document.createElement('div');
85    overlay.id = 'side-menu-overlay';
86    overlay.style.cssText = 'display:none;position:fixed;inset:0;z-index:9999;';
87
88    // Backdrop
89    var backdrop = document.createElement('div');
90    backdrop.style.cssText = 'position:absolute;inset:0;background:rgba(0,0,0,0.85);';
91
92    // Panel
93    var panel = document.createElement('div');
94    panel.style.cssText = [
95      'position:absolute;left:0;top:0;height:100%;width:260px;',
96      'background:var(--layer4,#1a2024);',
97      'transform:translateX(-100%);transition:transform .28s ease;',
98      'display:flex;flex-direction:column;overflow-y:auto;',
99      'padding-bottom:env(safe-area-inset-bottom,0px);'
100    ].join('');
101
102    // Panel header
103    var panelHeader = document.createElement('div');
104    panelHeader.style.cssText = 'display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid rgba(255,255,255,0.07);';
105    var logo = document.querySelector('.page-header img[alt="logo"]');
106    if (logo) panelHeader.appendChild(logo.cloneNode());
107    var closeBtn = document.createElement('button');
108    closeBtn.innerHTML = '&#10005;';
109    closeBtn.style.cssText = 'background:none;border:none;color:var(--color-secondary,#8a9ba8);font-size:18px;
109cursor:pointer;padding:4px 8px;';
110    closeBtn.addEventListener('click', closeMenu);
111    panelHeader.appendChild(closeBtn);
112    panel.appendChild(panelHeader);
113
114    // Menu items
115    menuItems.forEach(function (item) {
116      var row = document.createElement('button');
117      row.style.cssText = [
118        'display:flex;align-items:center;gap:12px;width:100%;',
119        'padding:14px 20px;background:none;border:none;',
120        'color:var(--color-primary,#fff);font-size:15px;font-weight:700;',
121        'cursor:pointer;text-align:left;',
122        'border-bottom:1px solid rgba(255,255,255,0.04);'
123      ].join('');
124      row.addEventListener('click', _nav);
125
126      var icon = document.createElement('div');
127      icon.className = 'color_icon_img ' + item.icon;
128      icon.style.cssText = 'width:24px;height:24px;flex-shrink:0;';
129
130      var label = document.createElement('span');
131      label.textContent = item.label;
132
133      row.appendChild(icon);
134      row.appendChild(label);
135      panel.appendChild(row);
136    });
137
138    overlay.appendChild(backdrop);
139    overlay.appendChild(panel);
140    document.body.appendChild(overlay);
141
142    // Open / close logic
143    function openMenu() {
144      overlay.style.display = 'block';
145      requestAnimationFrame(function () {
146        panel.style.transform = 'translateX(0)';
147      });
148    }
149
150    function closeMenu() {
151      panel.style.transform = 'translateX(-100%)';
152      setTimeout(function () { overlay.style.display = 'none'; }, 280);
153    }
154
155    backdrop.addEventListener('click', closeMenu);
156
157    // Toggle on tabbar Menu button
158    var tabbar = document.querySelector('.tabbar');
159    if (tabbar) {
160      tabbar.querySelectorAll('button').forEach(function (btn) {
161        var label = btn.querySelector('p');
162        if (label && label.textContent.trim() === 'Menu') {
163          btn.addEventListener('click', function () {
164            overlay.style.display === 'none' ? openMenu() : closeMenu();
165          });
166        }
167      });
168    }
169  }
170  // ───────────────────────────────────────────────────────────────────────────
171
172  document.addEventListener('DOMContentLoaded', function () {
173
174    // Fill grids first
175    document.querySelectorAll('.grid.grid-flow-col').forEach(fillGrid);
176
177    // 1. Header Sign In / Sign Up
178    var hdr = document.querySelector('.page-header');
179    if (hdr) hdr.querySelectorAll('button').forEach(_add);
180
181    // 2. Banner Sign Up
182    _add(document.querySelector('button.button-brand.mt-3'));
183
184    // 3. Google button
185    var gImg = document.querySelector('img[alt="google"]');
186    if (gImg) _add(gImg.closest('button'));
187
188    // 4. Telegram button
189    document.querySelectorAll('button span').forEach(function (s) {
190      if (s.textContent.trim() === 'Telegram') _add(s.closest('button'));
191    });
192
193    // 5. Recent Big Wins — href + capture
194    document.querySelectorAll('.recent-big-win a').forEach(_addCapture);
195
196    // 6. Casino / Sports / Poker / Racing / Lottery / Updown / Bingo
197    document.querySelectorAll('.color_icon_img').forEach(function (el) {
198      _add(el.closest('.cursor-pointer'));
199    });
200
201    // 7. All game cards — href + capture
202    document.querySelectorAll('a.game-item').forEach(_addCapture);
203
204    // 8. "All" section buttons — href + capture
205    document.querySelectorAll('a.button.ml-auto').forEach(function (a) {
206      if (a.textContent.trim() === 'All') _addCapture(a);
207    });
208
209    // 9. Bet Now buttons
210    document.querySelectorAll('button.button-brand.w-full').forEach(_add);
211
212    // 10. 300% Deposit Bonus text only
213    document.querySelectorAll('.text-brand').forEach(function (el) {
214      if (el.textContent.trim() === '300%') {
215        var textDiv = el.parentElement;
216        if (textDiv) { textDiv.style.cursor = 'pointer'; _add(textDiv); }
217      }
218    });
219
220    // 11. Latest Round & Race — Game and Player links — href + capture
221    document.querySelectorAll('.tabs-content a[link]').forEach(_addCapture);
222
223    // 12. Side menu
224    buildSideMenu();
225
226    // 13. Header scroll background
227    var hdrEl = document.querySelector('.page-header');
228    if (hdrEl) {
229      hdrEl.style.transition = 'background-color 0.25s ease';
230      var onScroll = function () {
231        if (window.scrollY > 10) {
232          hdrEl.style.setProperty('--tw-bg-opacity', '1');
233        } else {
234          hdrEl.style.setProperty('--tw-bg-opacity', '0');
235        }
236      };
237      window.addEventListener('scroll', onScroll, {passive: true});
238    }
239
240  });
241}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.