extensions/net.sf.basedb.reggie/trunk/resources/keep_session_alive.js

Code
Comments
Other
Rev Date Author Line
2691 24 Sep 14 nicklas 1
2691 24 Sep 14 nicklas 2 var KeepAlive = function()
2691 24 Sep 14 nicklas 3 {
2691 24 Sep 14 nicklas 4   var keepalive = {};
2691 24 Sep 14 nicklas 5   
2691 24 Sep 14 nicklas 6   keepalive.initPage = function()
2691 24 Sep 14 nicklas 7   {
2691 24 Sep 14 nicklas 8     // Dispatch an event to the 'timeoutMessage' <div> asking it to restore navigation buttons
2691 24 Sep 14 nicklas 9     var timeoutMessage = window.opener.document.getElementById('timeoutMessage');
2691 24 Sep 14 nicklas 10     var customEvent = timeoutMessage.ownerDocument.createEvent('CustomEvent');
2691 24 Sep 14 nicklas 11     customEvent.initCustomEvent('logged-in', true, true, {});
2691 24 Sep 14 nicklas 12     timeoutMessage.dispatchEvent(customEvent);
2691 24 Sep 14 nicklas 13     // Close this window
2691 24 Sep 14 nicklas 14     window.close();
2691 24 Sep 14 nicklas 15   }
2691 24 Sep 14 nicklas 16   
2691 24 Sep 14 nicklas 17   return keepalive;
2691 24 Sep 14 nicklas 18 }();
2691 24 Sep 14 nicklas 19
2691 24 Sep 14 nicklas 20 Doc.onLoad(KeepAlive.initPage);
2691 24 Sep 14 nicklas 21