Allow check intervals as low as 10 seconds
- Switch from Chrome alarms (30s min) to setTimeout loops - Config now uses checkIntervalSeconds instead of minutes - Default: 15 seconds, minimum: 10 seconds - Prevents overlapping checks with isChecking flag - Updated popup UI to show seconds Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
document.getElementById("webhook").value = config.discordWebhook || "";
|
||||
document.getElementById("urls").value = (config.urls || []).join("\n");
|
||||
document.getElementById("keywords").value = (config.keywords || []).join(", ");
|
||||
document.getElementById("interval").value = config.checkIntervalMinutes || 1;
|
||||
document.getElementById("interval").value = config.checkIntervalSeconds || 15;
|
||||
document.getElementById("enabled").checked = config.enabled !== false;
|
||||
document.getElementById("notifyNew").checked = config.notifyNewProducts !== false;
|
||||
document.getElementById("notifyRestock").checked = config.notifyRestocks !== false;
|
||||
@@ -27,7 +27,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
discordWebhook: document.getElementById("webhook").value.trim(),
|
||||
urls: urlsText.split("\n").map(u => u.trim()).filter(u => u),
|
||||
keywords: keywordsText.split(",").map(k => k.trim()).filter(k => k),
|
||||
checkIntervalMinutes: parseInt(document.getElementById("interval").value) || 1,
|
||||
checkIntervalSeconds: parseInt(document.getElementById("interval").value) || 15,
|
||||
enabled: document.getElementById("enabled").checked,
|
||||
notifyNewProducts: document.getElementById("notifyNew").checked,
|
||||
notifyRestocks: document.getElementById("notifyRestock").checked
|
||||
|
||||
Reference in New Issue
Block a user