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:
parent
b2e96c6191
commit
2f711db66c
5 changed files with 45 additions and 21 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.14.37
|
// @version 0.14.38
|
||||||
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
||||||
// @author GaboGG + Hermes
|
// @author GaboGG + Hermes
|
||||||
// @match *://*.hentaiverse.org/*
|
// @match *://*.hentaiverse.org/*
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
// CONFIG — default settings
|
// CONFIG — default settings
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
const VERSION = '0.14.37';
|
const VERSION = '0.14.38';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle automation
|
// — Battle automation
|
||||||
|
|
@ -3936,12 +3936,16 @@ function buildGearPanel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function enhanceGearAnalysis() {
|
function enhanceGearAnalysis() {
|
||||||
// Only on Bazaar pages with equiplist
|
// Works on Bazaar pages (equiplist) AND equipment pages (eqsb)
|
||||||
if (!document.getElementById('equiplist')) return;
|
const equiplist = document.getElementById('equiplist');
|
||||||
|
const eqsb = document.getElementById('eqsb');
|
||||||
|
if (!equiplist && !eqsb) return;
|
||||||
if (document.getElementById('hv-gear-btn')) return;
|
if (document.getElementById('hv-gear-btn')) return;
|
||||||
|
|
||||||
const url = window.location.href || '';
|
const url = window.location.href || '';
|
||||||
const isBuy = url.includes('screen=purchase') || url.includes('ss=bi');
|
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');
|
const bar = document.createElement('div');
|
||||||
bar.id = 'hv-gear-btn';
|
bar.id = 'hv-gear-btn';
|
||||||
|
|
@ -3998,13 +4002,17 @@ function enhanceGearAnalysis() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
bar.appendChild(rescanBtn);
|
bar.appendChild(rescanBtn);
|
||||||
|
if (isEquipPage) rescanBtn.style.display = 'none';
|
||||||
|
|
||||||
// Insert into the page (next to the armory toolbar if present)
|
// Insert into the page — before equiplist (Bazaar) or after eqsb (equipment page)
|
||||||
const equiplist = document.getElementById('equiplist');
|
|
||||||
const container = document.createElement('div');
|
const container = document.createElement('div');
|
||||||
container.style.cssText = 'margin-bottom:4px';
|
container.style.cssText = 'margin-bottom:4px';
|
||||||
container.appendChild(bar);
|
container.appendChild(bar);
|
||||||
|
if (equiplist) {
|
||||||
equiplist.parentNode.insertBefore(container, 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');
|
console.log('%c[HV] 🛡️ Gear analysis enabled — click 🔍 or 🔄', 'color:#0f0');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.14.37
|
// @version 0.14.38
|
||||||
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
||||||
// @author GaboGG + Hermes
|
// @author GaboGG + Hermes
|
||||||
// @match *://*.hentaiverse.org/*
|
// @match *://*.hentaiverse.org/*
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
// CONFIG — default settings
|
// CONFIG — default settings
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
const VERSION = '0.14.37';
|
const VERSION = '0.14.38';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle automation
|
// — Battle automation
|
||||||
|
|
@ -3936,12 +3936,16 @@ function buildGearPanel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function enhanceGearAnalysis() {
|
function enhanceGearAnalysis() {
|
||||||
// Only on Bazaar pages with equiplist
|
// Works on Bazaar pages (equiplist) AND equipment pages (eqsb)
|
||||||
if (!document.getElementById('equiplist')) return;
|
const equiplist = document.getElementById('equiplist');
|
||||||
|
const eqsb = document.getElementById('eqsb');
|
||||||
|
if (!equiplist && !eqsb) return;
|
||||||
if (document.getElementById('hv-gear-btn')) return;
|
if (document.getElementById('hv-gear-btn')) return;
|
||||||
|
|
||||||
const url = window.location.href || '';
|
const url = window.location.href || '';
|
||||||
const isBuy = url.includes('screen=purchase') || url.includes('ss=bi');
|
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');
|
const bar = document.createElement('div');
|
||||||
bar.id = 'hv-gear-btn';
|
bar.id = 'hv-gear-btn';
|
||||||
|
|
@ -3998,13 +4002,17 @@ function enhanceGearAnalysis() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
bar.appendChild(rescanBtn);
|
bar.appendChild(rescanBtn);
|
||||||
|
if (isEquipPage) rescanBtn.style.display = 'none';
|
||||||
|
|
||||||
// Insert into the page (next to the armory toolbar if present)
|
// Insert into the page — before equiplist (Bazaar) or after eqsb (equipment page)
|
||||||
const equiplist = document.getElementById('equiplist');
|
|
||||||
const container = document.createElement('div');
|
const container = document.createElement('div');
|
||||||
container.style.cssText = 'margin-bottom:4px';
|
container.style.cssText = 'margin-bottom:4px';
|
||||||
container.appendChild(bar);
|
container.appendChild(bar);
|
||||||
|
if (equiplist) {
|
||||||
equiplist.parentNode.insertBefore(container, 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');
|
console.log('%c[HV] 🛡️ Gear analysis enabled — click 🔍 or 🔄', 'color:#0f0');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// CONFIG — default settings
|
// CONFIG — default settings
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
const VERSION = '0.14.37';
|
const VERSION = '0.14.38';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle automation
|
// — Battle automation
|
||||||
|
|
|
||||||
|
|
@ -228,12 +228,16 @@ function buildGearPanel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function enhanceGearAnalysis() {
|
function enhanceGearAnalysis() {
|
||||||
// Only on Bazaar pages with equiplist
|
// Works on Bazaar pages (equiplist) AND equipment pages (eqsb)
|
||||||
if (!document.getElementById('equiplist')) return;
|
const equiplist = document.getElementById('equiplist');
|
||||||
|
const eqsb = document.getElementById('eqsb');
|
||||||
|
if (!equiplist && !eqsb) return;
|
||||||
if (document.getElementById('hv-gear-btn')) return;
|
if (document.getElementById('hv-gear-btn')) return;
|
||||||
|
|
||||||
const url = window.location.href || '';
|
const url = window.location.href || '';
|
||||||
const isBuy = url.includes('screen=purchase') || url.includes('ss=bi');
|
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');
|
const bar = document.createElement('div');
|
||||||
bar.id = 'hv-gear-btn';
|
bar.id = 'hv-gear-btn';
|
||||||
|
|
@ -290,13 +294,17 @@ function enhanceGearAnalysis() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
bar.appendChild(rescanBtn);
|
bar.appendChild(rescanBtn);
|
||||||
|
if (isEquipPage) rescanBtn.style.display = 'none';
|
||||||
|
|
||||||
// Insert into the page (next to the armory toolbar if present)
|
// Insert into the page — before equiplist (Bazaar) or after eqsb (equipment page)
|
||||||
const equiplist = document.getElementById('equiplist');
|
|
||||||
const container = document.createElement('div');
|
const container = document.createElement('div');
|
||||||
container.style.cssText = 'margin-bottom:4px';
|
container.style.cssText = 'margin-bottom:4px';
|
||||||
container.appendChild(bar);
|
container.appendChild(bar);
|
||||||
|
if (equiplist) {
|
||||||
equiplist.parentNode.insertBefore(container, 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');
|
console.log('%c[HV] 🛡️ Gear analysis enabled — click 🔍 or 🔄', 'color:#0f0');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.14.37
|
// @version 0.14.38
|
||||||
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
||||||
// @author GaboGG + Hermes
|
// @author GaboGG + Hermes
|
||||||
// @match *://*.hentaiverse.org/*
|
// @match *://*.hentaiverse.org/*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue