v0.17.5 - jpx bridge: verify M keybind lands + log mob count

Adds a probe after dispatching the synthetic M keydown: compares jpx's
active state before/after 700ms and logs  registered or  keybind miss.
This distinguishes 'M not reaching jpx' from 'jpx not chaining'.
This commit is contained in:
GaboGG 2026-08-04 17:06:50 -04:00
parent 4d29215e71
commit 5012d5f74f
5 changed files with 39 additions and 9 deletions

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name HV Unified
// @namespace hvunified
// @version 0.17.4
// @version 0.17.5
// @description HV Unified — Bridge & Strategy/Gear Advisor for HentaiVerse (complements Monsterbation & HVUtils)
// @author GaboGG + Hermes
// @match *://*.hentaiverse.org/*
@ -18,7 +18,7 @@
// CONFIG — default settings
// ═══════════════════════════════════════════════════════════════════════
const VERSION = '0.17.4';
const VERSION = '0.17.5';
const CFG = {
// — Battle strategy advisory
@ -1606,7 +1606,17 @@ function jpxTriggerAuto() {
bubbles: true,
cancelable: true,
});
// Give jpx a moment to process, then verify via its own state event.
// If it didn't toggle, the keybind didn't reach jpx.
const before = jpxLastActive;
document.dispatchEvent(evt);
setTimeout(() => {
if (jpxLastActive !== before) {
console.log(`%c[HV] ✅ M registered (active: ${before}${jpxLastActive})`, 'color:#0f0');
} else {
console.log(`%c[HV] ❌ M ignored by jpx (still active: ${jpxLastActive}) — keybind miss`, 'color:#f44');
}
}, 700);
return true;
} catch (e) {
console.warn('[HV] jpxTriggerAuto failed:', e.message);
@ -1667,7 +1677,7 @@ function jpxChainOnState(detail) {
clearInterval(timer);
jpxChainWaiting = false;
setTimeout(jpxTriggerAuto, 200);
console.log(`%c[HV] ⛓ chaining round ${jpxChainRounds}${CFG.chainMaxRounds ? '/' + CFG.chainMaxRounds : ''}`, 'color:#0f0');
console.log(`%c[HV] ⛓ chaining round ${jpxChainRounds}${CFG.chainMaxRounds ? '/' + CFG.chainMaxRounds : ''} (${jpxMonstersPresent()} mobs)`, 'color:#0f0');
} else if (waited > 8000 || jpxBattleOver()) {
clearInterval(timer);
jpxChainWaiting = false;

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name HV Unified
// @namespace hvunified
// @version 0.17.4
// @version 0.17.5
// @description HV Unified — Bridge & Strategy/Gear Advisor for HentaiVerse (complements Monsterbation & HVUtils)
// @author GaboGG + Hermes
// @match *://*.hentaiverse.org/*
@ -18,7 +18,7 @@
// CONFIG — default settings
// ═══════════════════════════════════════════════════════════════════════
const VERSION = '0.17.4';
const VERSION = '0.17.5';
const CFG = {
// — Battle strategy advisory
@ -1606,7 +1606,17 @@ function jpxTriggerAuto() {
bubbles: true,
cancelable: true,
});
// Give jpx a moment to process, then verify via its own state event.
// If it didn't toggle, the keybind didn't reach jpx.
const before = jpxLastActive;
document.dispatchEvent(evt);
setTimeout(() => {
if (jpxLastActive !== before) {
console.log(`%c[HV] ✅ M registered (active: ${before}${jpxLastActive})`, 'color:#0f0');
} else {
console.log(`%c[HV] ❌ M ignored by jpx (still active: ${jpxLastActive}) — keybind miss`, 'color:#f44');
}
}, 700);
return true;
} catch (e) {
console.warn('[HV] jpxTriggerAuto failed:', e.message);
@ -1667,7 +1677,7 @@ function jpxChainOnState(detail) {
clearInterval(timer);
jpxChainWaiting = false;
setTimeout(jpxTriggerAuto, 200);
console.log(`%c[HV] ⛓ chaining round ${jpxChainRounds}${CFG.chainMaxRounds ? '/' + CFG.chainMaxRounds : ''}`, 'color:#0f0');
console.log(`%c[HV] ⛓ chaining round ${jpxChainRounds}${CFG.chainMaxRounds ? '/' + CFG.chainMaxRounds : ''} (${jpxMonstersPresent()} mobs)`, 'color:#0f0');
} else if (waited > 8000 || jpxBattleOver()) {
clearInterval(timer);
jpxChainWaiting = false;

View file

@ -2,7 +2,7 @@
// CONFIG — default settings
// ═══════════════════════════════════════════════════════════════════════
const VERSION = '0.17.4';
const VERSION = '0.17.5';
const CFG = {
// — Battle strategy advisory

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name HV Unified
// @namespace hvunified
// @version 0.17.4
// @version 0.17.5
// @description HV Unified — Bridge & Strategy/Gear Advisor for HentaiVerse (complements Monsterbation & HVUtils)
// @author GaboGG + Hermes
// @match *://*.hentaiverse.org/*

View file

@ -59,7 +59,17 @@ function jpxTriggerAuto() {
bubbles: true,
cancelable: true,
});
// Give jpx a moment to process, then verify via its own state event.
// If it didn't toggle, the keybind didn't reach jpx.
const before = jpxLastActive;
document.dispatchEvent(evt);
setTimeout(() => {
if (jpxLastActive !== before) {
console.log(`%c[HV] ✅ M registered (active: ${before}${jpxLastActive})`, 'color:#0f0');
} else {
console.log(`%c[HV] ❌ M ignored by jpx (still active: ${jpxLastActive}) — keybind miss`, 'color:#f44');
}
}, 700);
return true;
} catch (e) {
console.warn('[HV] jpxTriggerAuto failed:', e.message);
@ -120,7 +130,7 @@ function jpxChainOnState(detail) {
clearInterval(timer);
jpxChainWaiting = false;
setTimeout(jpxTriggerAuto, 200);
console.log(`%c[HV] ⛓ chaining round ${jpxChainRounds}${CFG.chainMaxRounds ? '/' + CFG.chainMaxRounds : ''}`, 'color:#0f0');
console.log(`%c[HV] ⛓ chaining round ${jpxChainRounds}${CFG.chainMaxRounds ? '/' + CFG.chainMaxRounds : ''} (${jpxMonstersPresent()} mobs)`, 'color:#0f0');
} else if (waited > 8000 || jpxBattleOver()) {
clearInterval(timer);
jpxChainWaiting = false;