diff --git a/VERSIONS.md b/VERSIONS.md index b02a3b4..cdc4277 100644 --- a/VERSIONS.md +++ b/VERSIONS.md @@ -1,3 +1,6 @@ +# Version 1.7.3 +* Fixed block page showing cycle rollover time instead of manual lockdown end time. + # Version 1.7.2 (04 Jan 2026) * Added option to specify minimum block time. * Added option to block only first accessed page of block set. diff --git a/background.js b/background.js index e2121b7..5d79790 100644 --- a/background.js +++ b/background.js @@ -1283,8 +1283,15 @@ function getUnblockTime(set) { } else if (!timePeriods && timeLimit) { // Case 2: after time limit (no time periods) - // Return end time for current time limit period - unblockTime = new Date(timedata[2] * 1000 + limitPeriod * 1000); + // Determine whether time limit has actually been exceeded + let secsRollover = rollover ? timedata[5] : 0; + let afterTimeLimit = (timedata[2] == periodStart) + && (timedata[3] >= secsRollover + (limitMins * 60)); + + if (afterTimeLimit) { + // Return end time for current time limit period + unblockTime = new Date(timedata[2] * 1000 + limitPeriod * 1000); + } } else if (timePeriods && timeLimit) { if (conjMode) { // Case 3: within time periods AND after time limit @@ -1330,7 +1337,7 @@ function getUnblockTime(set) { } } - if (!unblockTime) { + if (!unblockTime && afterTimeLimit) { // Return end time for current time limit period unblockTime = new Date(timedata[2] * 1000 + limitPeriod * 1000); }