fix: reveal mode not working when already ON at page load
If reveal mode was saved as ON in settings, the page loaded with revealMode=true and prevRevealMode=true. The checkRevealToggle function only fires on transitions (off→on or on→off), so the reveal interval was never started. Added initialization check that starts the reveal interval immediately if revealMode is already true at page load. https://claude.ai/code/session_01KF4i7Ra7zCEDskxDBaNtcT
This commit is contained in:
@@ -1715,6 +1715,14 @@
|
||||
prevRevealMode = settings.revealMode;
|
||||
}
|
||||
|
||||
// If reveal mode was already ON at page load, start the interval immediately
|
||||
if (settings.revealMode) {
|
||||
console.log('[Silent Send] Reveal mode ON (from saved settings)');
|
||||
revealInterval = setInterval(() => {
|
||||
if (settings.revealMode) revealAllResponses();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
// Hook into config updates to detect reveal toggle
|
||||
window.addEventListener('message', (event) => {
|
||||
if (event.source !== window) return;
|
||||
|
||||
Reference in New Issue
Block a user