This version automatically turns ON at 8 AM and OFF at 7 PM every day.
- 8:00 AM: Extension automatically enables (starts simulating mouse movement)
- 7:00 PM: Extension automatically disables (stops simulating mouse movement)
- The schedule checker runs every minute to ensure timing accuracy
- You can still manually toggle the extension on/off using the popup
- Manual toggles will be overridden by the schedule (e.g., if you turn it on at 8 PM, it will turn off at the next schedule check)
The content.js file now includes:
-
Schedule Constants:
AUTO_ON_HOUR = 8(8 AM)AUTO_OFF_HOUR = 19(7 PM in 24-hour format)
-
Schedule Checker:
- Runs every 60 seconds
- Checks current time against working hours
- Automatically enables/disables the extension
-
Working Hours Function:
function isWorkingHours() { const now = new Date(); const hour = now.getHours(); return hour >= AUTO_ON_HOUR && hour < AUTO_OFF_HOUR; }
Same as before:
- Go to
about:debuggingin Firefox - Click "Load Temporary Add-on"
- Select the
manifest.jsonfile - The extension will now automatically turn on at 8 AM and off at 7 PM
To change the schedule times, edit content.js:
const AUTO_ON_HOUR = 8; // Change to desired start hour (0-23)
const AUTO_OFF_HOUR = 19; // Change to desired end hour (0-23)For example:
- Start at 7 AM, end at 6 PM:
AUTO_ON_HOUR = 7,AUTO_OFF_HOUR = 18 - Start at 9 AM, end at 8 PM:
AUTO_ON_HOUR = 9,AUTO_OFF_HOUR = 20
The extension logs all automatic actions:
[W365 Keep-Alive] Auto-enabling at HH:MM:SS[W365 Keep-Alive] Auto-disabling at HH:MM:SS[W365 Keep-Alive] Schedule checker started (8 AM ON, 7 PM OFF)
Check the browser console (F12) to see these messages.
content.js- Updated with scheduling logicpopup.js- Unchangedpopup.html- Unchangedbackground.js- Unchangedmanifest.json- Unchangedicon.png- Unchanged