From c35127c5b7e39acd2641c35c3a9fa6a535260f07 Mon Sep 17 00:00:00 2001 From: QLHazyCoder <2825305047@qq.com> Date: Wed, 22 Apr 2026 02:10:07 +0800 Subject: [PATCH] fix: remove hardcoded max run count and adjust fallback risk warning logic --- background.js | 2 +- sidepanel/sidepanel.html | 2 +- sidepanel/sidepanel.js | 15 +-- tests/run-count-unlimited.test.js | 93 ++++++++++++++++++ tests/sidepanel-auto-run-risk-warning.test.js | 96 +++++++++++++++++++ 5 files changed, 196 insertions(+), 12 deletions(-) create mode 100644 tests/run-count-unlimited.test.js create mode 100644 tests/sidepanel-auto-run-risk-warning.test.js diff --git a/background.js b/background.js index eb23563..7297909 100644 --- a/background.js +++ b/background.js @@ -450,7 +450,7 @@ function normalizeRunCount(value) { if (!Number.isFinite(numeric)) { return 1; } - return Math.min(50, Math.max(1, Math.floor(numeric))); + return Math.max(1, Math.floor(numeric)); } function normalizeAutoRunTimerKind(value = '') { diff --git a/sidepanel/sidepanel.html b/sidepanel/sidepanel.html index c8f4b05..6b75d35 100644 --- a/sidepanel/sidepanel.html +++ b/sidepanel/sidepanel.html @@ -36,7 +36,7 @@
- +