v0.14.38 - Gear analysis on equipment pages too (ss=eq)

- enhanceGearAnalysis now also fires on Character > Equipment pages
  (id=eqsb), not just Bazaar (equiplist)
- On equipment pages only the Analyze button shows (Rescan hidden —
  no store/inventory data to rescan there, but the localStorage DB
  is still accessible for the comparison)
- Clicking Analyze on ss=eq rescrapes equipped slots + opens panel
  with stored/purchasable comparisons from localStorage
This commit is contained in:
GaboGG 2026-07-31 10:42:39 -04:00
parent b2e96c6191
commit 2f711db66c
5 changed files with 45 additions and 21 deletions

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name HV Unified
// @namespace hvunified
// @version 0.14.37
// @version 0.14.38
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
// @author GaboGG + Hermes
// @match *://*.hentaiverse.org/*
@ -17,7 +17,7 @@
// CONFIG — default settings
// ═══════════════════════════════════════════════════════════════════════
const VERSION = '0.14.37';
const VERSION = '0.14.38';
const CFG = {
// — Battle automation
@ -3936,12 +3936,16 @@ function buildGearPanel() {
}
function enhanceGearAnalysis() {
// Only on Bazaar pages with equiplist
if (!document.getElementById('equiplist')) return;
// Works on Bazaar pages (equiplist) AND equipment pages (eqsb)
const equiplist = document.getElementById('equiplist');
const eqsb = document.getElementById('eqsb');
if (!equiplist && !eqsb) return;
if (document.getElementById('hv-gear-btn')) return;
const url = window.location.href || '';
const isBuy = url.includes('screen=purchase') || url.includes('ss=bi');
// On equipment pages, only show the Analyze button (no rescan — no store data there)
const isEquipPage = !!eqsb && !equiplist;
const bar = document.createElement('div');
bar.id = 'hv-gear-btn';
@ -3998,13 +4002,17 @@ function enhanceGearAnalysis() {
}
};
bar.appendChild(rescanBtn);
if (isEquipPage) rescanBtn.style.display = 'none';
// Insert into the page (next to the armory toolbar if present)
const equiplist = document.getElementById('equiplist');
// Insert into the page — before equiplist (Bazaar) or after eqsb (equipment page)
const container = document.createElement('div');
container.style.cssText = 'margin-bottom:4px';
container.appendChild(bar);
equiplist.parentNode.insertBefore(container, equiplist);
if (equiplist) {
equiplist.parentNode.insertBefore(container, equiplist);
} else if (eqsb) {
eqsb.parentNode.insertBefore(container, eqsb.nextSibling);
}
console.log('%c[HV] 🛡️ Gear analysis enabled — click 🔍 or 🔄', 'color:#0f0');
}

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name HV Unified
// @namespace hvunified
// @version 0.14.37
// @version 0.14.38
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
// @author GaboGG + Hermes
// @match *://*.hentaiverse.org/*
@ -17,7 +17,7 @@
// CONFIG — default settings
// ═══════════════════════════════════════════════════════════════════════
const VERSION = '0.14.37';
const VERSION = '0.14.38';
const CFG = {
// — Battle automation
@ -3936,12 +3936,16 @@ function buildGearPanel() {
}
function enhanceGearAnalysis() {
// Only on Bazaar pages with equiplist
if (!document.getElementById('equiplist')) return;
// Works on Bazaar pages (equiplist) AND equipment pages (eqsb)
const equiplist = document.getElementById('equiplist');
const eqsb = document.getElementById('eqsb');
if (!equiplist && !eqsb) return;
if (document.getElementById('hv-gear-btn')) return;
const url = window.location.href || '';
const isBuy = url.includes('screen=purchase') || url.includes('ss=bi');
// On equipment pages, only show the Analyze button (no rescan — no store data there)
const isEquipPage = !!eqsb && !equiplist;
const bar = document.createElement('div');
bar.id = 'hv-gear-btn';
@ -3998,13 +4002,17 @@ function enhanceGearAnalysis() {
}
};
bar.appendChild(rescanBtn);
if (isEquipPage) rescanBtn.style.display = 'none';
// Insert into the page (next to the armory toolbar if present)
const equiplist = document.getElementById('equiplist');
// Insert into the page — before equiplist (Bazaar) or after eqsb (equipment page)
const container = document.createElement('div');
container.style.cssText = 'margin-bottom:4px';
container.appendChild(bar);
equiplist.parentNode.insertBefore(container, equiplist);
if (equiplist) {
equiplist.parentNode.insertBefore(container, equiplist);
} else if (eqsb) {
eqsb.parentNode.insertBefore(container, eqsb.nextSibling);
}
console.log('%c[HV] 🛡️ Gear analysis enabled — click 🔍 or 🔄', 'color:#0f0');
}

View file

@ -2,7 +2,7 @@
// CONFIG — default settings
// ═══════════════════════════════════════════════════════════════════════
const VERSION = '0.14.37';
const VERSION = '0.14.38';
const CFG = {
// — Battle automation

View file

@ -228,12 +228,16 @@ function buildGearPanel() {
}
function enhanceGearAnalysis() {
// Only on Bazaar pages with equiplist
if (!document.getElementById('equiplist')) return;
// Works on Bazaar pages (equiplist) AND equipment pages (eqsb)
const equiplist = document.getElementById('equiplist');
const eqsb = document.getElementById('eqsb');
if (!equiplist && !eqsb) return;
if (document.getElementById('hv-gear-btn')) return;
const url = window.location.href || '';
const isBuy = url.includes('screen=purchase') || url.includes('ss=bi');
// On equipment pages, only show the Analyze button (no rescan — no store data there)
const isEquipPage = !!eqsb && !equiplist;
const bar = document.createElement('div');
bar.id = 'hv-gear-btn';
@ -290,13 +294,17 @@ function enhanceGearAnalysis() {
}
};
bar.appendChild(rescanBtn);
if (isEquipPage) rescanBtn.style.display = 'none';
// Insert into the page (next to the armory toolbar if present)
const equiplist = document.getElementById('equiplist');
// Insert into the page — before equiplist (Bazaar) or after eqsb (equipment page)
const container = document.createElement('div');
container.style.cssText = 'margin-bottom:4px';
container.appendChild(bar);
equiplist.parentNode.insertBefore(container, equiplist);
if (equiplist) {
equiplist.parentNode.insertBefore(container, equiplist);
} else if (eqsb) {
eqsb.parentNode.insertBefore(container, eqsb.nextSibling);
}
console.log('%c[HV] 🛡️ Gear analysis enabled — click 🔍 or 🔄', 'color:#0f0');
}

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name HV Unified
// @namespace hvunified
// @version 0.14.37
// @version 0.14.38
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
// @author GaboGG + Hermes
// @match *://*.hentaiverse.org/*