LegacyCollector

Home | Legacy Firefox Extensions | Content Policy | Contact

No Sleep Download

Author(s):



This extension prevents your computer from going to sleep while Firefox is actively downloading. The extension has no options, no configuration -- just install it and it should work.

Technical Details:

When a download begins, it makes a call to kernel32.dll SetThreadExecutionState to prevent the computer from going to sleep. Additional downloads simply increment an internal counter. When the counter hits zero (supposedly when all download have either completed, failed, or been paused, etc), it calls SetThreadExecutionState again to allow the computer to go to sleep again.

As it is right now, this is a stupidly simple extension. If anyone has requests, I can try to work them in; however, my real intent is to have existing download managers (I use DownloadStatusBar) pick this functionality up in their code.

Tested on Win7 (x64) and Firefox 9.0.1.

Update:
I updated this for Firefox 18.0 and seems to work fine on my laptop. Let me know if it works/doesn't work for you.

Download files:

no-sleep-download-1.0.1-signed.1-signed-windows.xpi
no-sleep-download-2.0.1-signed.1-signed-windows.xpi




This page is part of the LegacyCollector website.
Disclaimer: All material on this site is property of their respective owners and available under
open licenses to the best of our knowledge. If you are an author and would like anything removed,
then please write an e-mail to legacy [at] collector dot org.