Browser Implants + True CSS Hover v5.39 (With Inventory Implant)

Browser Implants panel injected below AutoBank; includes Inventory Implant, Boss Map Implant, and others.

  1. // ==UserScript==
  2. // @name Browser Implants + True CSS Hover v5.39 (With Inventory Implant)
  3. // @namespace Zega
  4. // @version 5.39
  5. // @description Browser Implants panel injected below AutoBank; includes Inventory Implant, Boss Map Implant, and others.
  6. // @match https://fairview.deadfrontier.com/onlinezombiemmo/index.php*
  7. // @grant none
  8. // @run-at document-start
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. let _autoBankQueued = false, _autoBankDone = false;
  15. let _qbQueued = false, _qbDone = false;
  16. let _miniMapQueued = false, _miniMapDone = false;
  17.  
  18. function _onAutoBank() {
  19. if (_autoBankDone) return;
  20. _autoBankQueued = true;
  21. if (typeof fillAutoBankSlot === 'function') fillAutoBankSlot();
  22. }
  23. function _onQuickBuy() {
  24. if (_qbDone) return;
  25. _qbQueued = true;
  26. if (typeof fillQuickBuySlot === 'function') fillQuickBuySlot();
  27. }
  28. function _onMiniBossMap() {
  29. if (_miniMapDone) return;
  30. _miniMapQueued = true;
  31. if (typeof fillMiniBossMapSlot === 'function') fillMiniBossMapSlot();
  32. }
  33.  
  34. Object.defineProperty(window, 'BrowserImplant_AutoBank', {
  35. configurable:true, enumerable:true,
  36. set(v) { if(v) _onAutoBank(); Object.defineProperty(window,'BrowserImplant_AutoBank',{value:v,writable:true,configurable:true,enumerable:true}); },
  37. get(){ return false; }
  38. });
  39. Object.defineProperty(window, 'BrowserImplant_QuickBuy', {
  40. configurable:true, enumerable:true,
  41. set(v) { if(v) _onQuickBuy(); Object.defineProperty(window,'BrowserImplant_QuickBuy',{value:v,writable:true,configurable:true,enumerable:true}); },
  42. get(){ return false; }
  43. });
  44. Object.defineProperty(window, 'BrowserImplant_MiniBossMap', {
  45. configurable:true, enumerable:true,
  46. set(v) { if(v) _onMiniBossMap(); Object.defineProperty(window,'BrowserImplant_MiniBossMap',{value:v,writable:true,configurable:true,enumerable:true}); },
  47. get(){ return false; }
  48. });
  49.  
  50. window.addEventListener('load', initWhenReady);
  51.  
  52. function initWhenReady() {
  53. const interval = setInterval(() => {
  54. const rightTd = document.querySelector('td.design2010[style*="right_margin.jpg"]');
  55. const quickBuy = rightTd?.querySelector('#quickbuy-fieldset');
  56. const autoBank = rightTd?.querySelector('#auto-bank-panel');
  57. if (rightTd && quickBuy && autoBank) {
  58. clearInterval(interval);
  59. attachImplants(rightTd, autoBank);
  60. }
  61. }, 100);
  62. }
  63.  
  64. function attachImplants(rightTd, autoBank) {
  65. rightTd.style.position = 'relative';
  66. const panel = document.createElement('div');
  67. panel.id = 'browser-implant-panel';
  68. panel.innerHTML = `
  69. <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:4px;">
  70. <strong style="color:#ffd700;">Browser Implants</strong>
  71. <button id="collapse-browser-implant" style="background:none;border:none;color:#ffd700;font-size:16px;cursor:pointer">[–]</button>
  72. </div>
  73. <div class="implant-grid" id="implant-grid-container"></div>
  74. `;
  75. Object.assign(panel.style, {
  76. position: 'absolute',
  77. top: `${autoBank.offsetTop + autoBank.offsetHeight + 8}px`,
  78. left: autoBank.style.left || '10px',
  79. width: '420px',
  80. background: 'rgba(0,0,0,0.35)',
  81. padding: '8px 12px',
  82. border: '1px solid #666',
  83. borderRadius: '8px',
  84. boxShadow: '0 4px 12px rgba(0,0,0,0.6)',
  85. zIndex: '10000'
  86. });
  87. autoBank.parentNode.insertBefore(panel, autoBank.nextSibling);
  88.  
  89. const gridEl = panel.querySelector('#implant-grid-container');
  90. Object.assign(gridEl.style, {
  91. display: 'grid',
  92. gridTemplateColumns: 'repeat(4,36px)',
  93. gridTemplateRows: 'repeat(2,36px)',
  94. gap: '4px',
  95. justifyContent: 'center'
  96. });
  97.  
  98. const collapseBtn = panel.querySelector('#collapse-browser-implant');
  99. if (localStorage.getItem('browserImplantCollapsed') === 'true') {
  100. gridEl.style.display = 'none';
  101. collapseBtn.textContent = '[+]';
  102. }
  103. collapseBtn.addEventListener('click', () => {
  104. const hidden = gridEl.style.display === 'none';
  105. gridEl.style.display = hidden ? 'grid' : 'none';
  106. collapseBtn.textContent = hidden ? '[–]' : '[+]';
  107. localStorage.setItem('browserImplantCollapsed', hidden ? 'false' : 'true');
  108. });
  109.  
  110. const slots = [];
  111. for (let i = 0; i < 8; i++) {
  112. const slot = document.createElement('div');
  113. slot.className = 'slot';
  114. Object.assign(slot.style, {
  115. width: '36px', height: '36px', background: 'rgba(255,255,255,0.05)', border: '1px solid #888', borderRadius: '4px', position: 'relative'
  116. });
  117. const img = document.createElement('img');
  118. img.className = 'implant-icon';
  119. Object.assign(img.style, { position: 'absolute', top: '0', left: '0', objectFit: 'contain', cursor: 'default', display: 'none', width: '100%', height: '100%' });
  120. const popup = document.createElement('div');
  121. popup.className = 'hover-popup';
  122. Object.assign(popup.style, {
  123. display: 'none', position: 'absolute', bottom: '-58px', left: '50%', transform: 'translateX(-50%)', background: 'rgba(0,0,0,0.85)', padding: '6px', border: '1px solid #555', borderRadius: '6px', flexDirection: 'column', alignItems: 'center', zIndex: '1000', opacity: '0', transition: 'opacity .2s', width: '130px'
  124. });
  125. const hoverImg = document.createElement('img');
  126. hoverImg.className = 'hover-img'; hoverImg.style.width = '50px'; hoverImg.style.height = '50px'; hoverImg.style.marginBottom = '4px'; hoverImg.style.objectFit = 'contain';
  127. const hoverName = document.createElement('div'); hoverName.className = 'hover-name'; hoverName.style.cssText = 'color:gold;font-size:12px;margin:1px 0;line-height:1.1;text-align:center;';
  128. const hoverStat = document.createElement('div'); hoverStat.className = 'hover-stat'; hoverStat.style.cssText = hoverName.style.cssText;
  129. popup.appendChild(hoverImg); popup.appendChild(hoverName); popup.appendChild(hoverStat);
  130. slot.appendChild(img); slot.appendChild(popup);
  131. slot.addEventListener('mouseenter', () => { popup.style.display = 'flex'; popup.style.opacity = '1'; });
  132. slot.addEventListener('mouseleave', () => { popup.style.display = 'none'; popup.style.opacity = '0'; });
  133. gridEl.appendChild(slot);
  134. slots.push({ slot, img, hoverImg, hoverName, hoverStat });
  135. }
  136.  
  137. let next = 0;
  138. function fillSlot(data) {
  139. if (next >= slots.length) return;
  140. const { img, hoverImg, hoverName, hoverStat } = slots[next++];
  141. img.src = data.url; img.style.display = 'block';
  142. hoverImg.src = data.url;
  143. hoverName.textContent = data.name;
  144. hoverStat.textContent = data.stat;
  145. }
  146.  
  147. window.fillAutoBankSlot = () => { _autoBankDone || fillSlot({ url: 'https://files.catbox.moe/ry7yd2.png', name: 'Auto Bank Implant', stat: 'Bank Speed +60%' }); _autoBankDone = true; };
  148. window.fillQuickBuySlot = () => { _qbDone || fillSlot({ url: 'https://files.catbox.moe/urko7b.png', name: 'QuickBuy Implant', stat: 'Barter Speed +70%' }); _qbDone = true; };
  149. window.fillMiniBossMapSlot = () => { _miniMapDone || fillSlot({ url: 'https://files.catbox.moe/nvuk60.webp', name: 'Boss Map Implant', stat: 'They cant hide from us. Time to go hunting!' }); _miniMapDone = true; };
  150.  
  151. // Always fill core implants
  152. fillSlot({ url: 'https://files.catbox.moe/y2n5ij.png', name: 'Browser Implant', stat: 'Gain Efficiency +20%' });
  153. fillSlot({ url: 'https://files.catbox.moe/ry7yd2.png', name: 'Auto Bank Implant', stat: 'Bank Speed +60%' });
  154. if (window.BrowserImplant_MarketHover) fillSlot({ url: 'https://files.catbox.moe/kqee23.png', name: 'Market Hover Implant', stat: 'Trade Values +15%' });
  155.  
  156. // ✅ NEW: Inventory Implant
  157. if (window.BrowserImplant_InventoryCounter) {
  158. fillSlot({
  159. url: 'https://files.catbox.moe/axazel.png',
  160. name: 'Inventory Implant',
  161. stat: 'Capacity Awareness +100%'
  162. });
  163. }
  164.  
  165. if (_qbQueued) window.fillQuickBuySlot();
  166. if (_miniMapQueued) window.fillMiniBossMapSlot();
  167. }
  168. })();