v0.17.3 - Declare jpxChainRetryCount (fix ReferenceError crash on battle init)

This commit is contained in:
GaboGG 2026-08-04 16:00:19 -04:00
parent 30bade19bd
commit 6a7d5a435b
5 changed files with 12 additions and 9 deletions

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name HV Unified
// @namespace hvunified
// @version 0.17.2
// @version 0.17.3
// @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.2';
const VERSION = '0.17.3';
const CFG = {
// — Battle strategy advisory
@ -1562,6 +1562,7 @@ let jpxChainRounds = 0; // rounds chained this battle
let jpxChainTimer = null;
let jpxLastActive = null; // last known isActiveBattle from jpx
let jpxChainCooldown = 0; // timestamp guard to avoid double-trigger
let jpxChainRetryCount = 0; // lazy-start retry counter
function jpxPresent() {
return !!(document.getElementById('ctrl-widget') ||
@ -1575,7 +1576,6 @@ function jpxChainStart() {
if (jpxChainEnabled) return;
if (!jpxPresent()) {
// Retry a few times over ~6s before giving up
if (!jpxChainRetryCount) jpxChainRetryCount = 0;
if (jpxChainRetryCount < 10) {
jpxChainRetryCount++;
setTimeout(jpxChainStart, 600);
@ -1666,6 +1666,7 @@ function jpxChainOnState(detail) {
function jpxChainStop(reason) {
if (!jpxChainEnabled) return;
jpxChainEnabled = false;
jpxChainRetryCount = 0;
console.log('%c[HV] ⛓ jpx auto-chain stopped: ' + reason, 'color:#f80');
}

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name HV Unified
// @namespace hvunified
// @version 0.17.2
// @version 0.17.3
// @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.2';
const VERSION = '0.17.3';
const CFG = {
// — Battle strategy advisory
@ -1562,6 +1562,7 @@ let jpxChainRounds = 0; // rounds chained this battle
let jpxChainTimer = null;
let jpxLastActive = null; // last known isActiveBattle from jpx
let jpxChainCooldown = 0; // timestamp guard to avoid double-trigger
let jpxChainRetryCount = 0; // lazy-start retry counter
function jpxPresent() {
return !!(document.getElementById('ctrl-widget') ||
@ -1575,7 +1576,6 @@ function jpxChainStart() {
if (jpxChainEnabled) return;
if (!jpxPresent()) {
// Retry a few times over ~6s before giving up
if (!jpxChainRetryCount) jpxChainRetryCount = 0;
if (jpxChainRetryCount < 10) {
jpxChainRetryCount++;
setTimeout(jpxChainStart, 600);
@ -1666,6 +1666,7 @@ function jpxChainOnState(detail) {
function jpxChainStop(reason) {
if (!jpxChainEnabled) return;
jpxChainEnabled = false;
jpxChainRetryCount = 0;
console.log('%c[HV] ⛓ jpx auto-chain stopped: ' + reason, 'color:#f80');
}

View file

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

View file

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

View file

@ -15,6 +15,7 @@ let jpxChainRounds = 0; // rounds chained this battle
let jpxChainTimer = null;
let jpxLastActive = null; // last known isActiveBattle from jpx
let jpxChainCooldown = 0; // timestamp guard to avoid double-trigger
let jpxChainRetryCount = 0; // lazy-start retry counter
function jpxPresent() {
return !!(document.getElementById('ctrl-widget') ||
@ -28,7 +29,6 @@ function jpxChainStart() {
if (jpxChainEnabled) return;
if (!jpxPresent()) {
// Retry a few times over ~6s before giving up
if (!jpxChainRetryCount) jpxChainRetryCount = 0;
if (jpxChainRetryCount < 10) {
jpxChainRetryCount++;
setTimeout(jpxChainStart, 600);
@ -119,6 +119,7 @@ function jpxChainOnState(detail) {
function jpxChainStop(reason) {
if (!jpxChainEnabled) return;
jpxChainEnabled = false;
jpxChainRetryCount = 0;
console.log('%c[HV] ⛓ jpx auto-chain stopped: ' + reason, 'color:#f80');
}