magna
Follow @magnawebstudio on Twitter Follow @magnawebstudio on Twitter
Follow /magnawebstudio on LinkedIn Follow /magnawebstudio on LinkedIn
awarded site
BS"D
magna web studio
Contact us! Contact us!
WB-Developers' Corner
WB-Developers' Corner
       [rz] Idle Manager


The most lightweight solution to control events when the browser enters in idle mode.

- Manage events (after and before) when the browser enters in idle mode and "wakes-up".
- Automatically turns off the light when the browser is in idle mode with a customizable dimmer.
- Smooth dimmer effect.
- Redirection support when enters in idle mode.
- Instant or delayed "wake-up" mode allows to define how the browser reacts and comes back.
- Multi-instance: allows to build "eco-friendly" sites with different idle levels.
- Lightweight: no jQuery required.
- Supports all major browsers, even really old ones! (IE5+, Chrome, Safari, Opera, Firefox and more)


HTML 4.01 Transitional
W3C compliant


DEMO


* Just a brief about some of the changes that were made lately...

* New in version 1.1

- Custom color for the dim effect.
- Improved custom events handling.
- Optional embedded object with custom position.
- Fixed a glitch in multi-instance schemes on older browsers.
- Improved startup.

* New in version 1.0.0.3

- The core has been moved to an external file for a faster navigation between pages.
- Minor code optimizations.

* New in version 1.0.0.2

- Fixed a sporadic "false positive" warning in Internet Explorer 11 under Windows 8.1.
- Improved idle "wake-up" from within an inlineframe (the contained page must be in the same site).
- Minor code tweaks.

* New in version 1.0.0.1

- Added detection support when idle status is within an inlineframe.



How to use?

Just drag and drop the extension and optionally setup the self-explanatory properties.
If you need "deeper" idle levels, add a new instance and be sure the idle time is greater than in the previous instance.

Enjoy!


Advanced users

The [rz] Idle Manager is not just to fade-in and fade-out the browser! (Even you can ignore this and set the 'Dim' property to 0.)
You can manage advanced tasks where bandwidth is critical, here a few samples (using the global '
is_idle' value).

1.
A global case that news are updated every second

setInterval(function()
{
   if (is_idle)
   {
      //
      // perhaps the user is gone...
      // so, instead of update news, let's clean up the older ones!
      //
   }
   else
   {
      //
      // the user is here and active...
      // check and update the news!
      //
   }
}, 1000);


2.
A global case that news are updated every second with a multi-instance manager

in each [rz] Idle Manager instance:

- first instance: setup the idle time 60 seconds (one minute)
- second instance: setup the idle time 180 seconds (three minutes)

in your custom code section:

setInterval(function()
{
   if (is_idle == 1)
   {
      //
      // perhaps the user is gone...
      // so, instead of update news, let's clean up the older ones!
      //
   }
   else if (is_idle == 2)
   {
      //
      // oops...
      // seems that the user left me alone, log him out!
      //
   }
   else
   {
      //
      // the user is here and active...
      // check and update the news!
      //
   }
}, 1000);


3.
Events triggered only when the browser enters in idle mode and wakes-up

in [rz] Idle Manager, 'Events' category:

add in 'After in' property:
IdleChange();
add in 'After out' property:
ActiveChange();

in your custom code section:

function IdleChange()
{
   //
   // this function will be executed only when
   // the browser enters in idle mode
   //
}

function ActiveChange()
{
   //
   // this function will be executed only when
   // the browser is back to active mode
   //
}
w3c compliant
© 2012-17 by MAGNA web studio • all rights reserved


new shop with