User:Revansx/Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

//This is the Session Expiration Notification Timer $( function {       var timeout = 5*60*1000;                mw.loader.load( ['mediawiki.notification', 'mediawiki.api'] );                var notifyFunc = function {                var notifyObj;                var $msg = $( '  --- Attention ---  ' )                        .append( $( ' It has been a little while since this page has communicated with the server. If you are not ready to save your edits, you may CLICK HERE to renew the session to avoid the loss of any unsaved edits due to an expired session.' ) .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 ); } ); } );