Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Windows 365 Keep-Alive - Scheduled Version

This version automatically turns ON at 8 AM and OFF at 7 PM every day.

What Changed

Automatic Scheduling

  • 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

Manual Control Still Available

  • 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)

How It Works

The content.js file now includes:

  1. Schedule Constants:

    • AUTO_ON_HOUR = 8 (8 AM)
    • AUTO_OFF_HOUR = 19 (7 PM in 24-hour format)
  2. Schedule Checker:

    • Runs every 60 seconds
    • Checks current time against working hours
    • Automatically enables/disables the extension
  3. Working Hours Function:

    function isWorkingHours() {
      const now = new Date();
      const hour = now.getHours();
      return hour >= AUTO_ON_HOUR && hour < AUTO_OFF_HOUR;
    }

Installation

Same as before:

  1. Go to about:debugging in Firefox
  2. Click "Load Temporary Add-on"
  3. Select the manifest.json file
  4. The extension will now automatically turn on at 8 AM and off at 7 PM

Customization

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

Console Logging

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.

Files Included

  • content.js - Updated with scheduling logic
  • popup.js - Unchanged
  • popup.html - Unchanged
  • background.js - Unchanged
  • manifest.json - Unchanged
  • icon.png - Unchanged

About

Firefox plugin per evitar que les VM de Windows 365 Cloud PC's facin timeout. VIBE_CODED

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages