User:Portal Api/common.js

(function ($) {

/** * Checks to see if the cron should be automatically run. */ Wikipedia.behaviors.cronCheck = function(context) { if (Wikipedia.settings.cron.runNext || false) { $('body:not(.cron-check-processed)', context).addClass('cron-check-processed').each(function {     // Only execute the cron check if its the right time.      if (Math.round(new Date.getTime / 1000.0) >= Wikipedia.settings.cron.runNext) {        $.get(Wikipedia.settings.cron.basePath + '/run-cron-check');      }    }); } };

})(jQuery);