User:Revansx/Session Notification of Renewal

Mediawiki:Common.js code
/* Any JavaScript here will be loaded for all users on every page load. */

//This is the Session Expiration Notification Timer $( function {       var timeout = 10*1000;                mw.loader.load( ['mediawiki.notification', 'mediawiki.api'] );                var notifyFunc = function {                var notifyObj;                var $msg = $( '   --- Attention ---  It has been a while since this page communicated with the server. If you have not yet saved, you should CLICK HERE to extend your session before attempting to save your work. ' )                       .append( $( 'test' ) .click( function(e) {                                var api = new mw.Api;api.get( { action: 'query' } );                                e.preventDefault;                                notifyObj.close;                                window.setTimeout( notifyFunc, timeout);                                } ) );                       notifyObj = mw.notification.notify( $msg, { 'autoHide': false } );              }        if ( location.search.match(/(?:\?|&)(ve)?action=(edit|submit)/ ) ) {                 window.setTimeout( notifyFunc, timeout );        }       $( '#ca-ve-edit a' ).click( function  {  window.setTimeout( notifyFunc, timeout ); } ); } );

renew.php code
Renew the session  function mynotify3  { setTimeout(function { document.body.innerHTML = "This page was generated simply for the purpose of renewing the session. It will automatically close in 3 seconds."; }, 1); } function mynotify2  { setTimeout(function { document.body.innerHTML = "This page was generated simply for the purpose of renewing the session. It will automatically close in 2 seconds."; }, 1000); } function mynotify1  { setTimeout(function { document.body.innerHTML = "This page was generated simply for the purpose of renewing the session. It will automatically close in 1 seconds."; }, 2000); } function closeWindow { setTimeout(function { window.close; }, 3000); } window.onload = mynotify3; window.onload = mynotify2; window.onload = mynotify1; window.onload = closeWindow;