https://lindisfarne-scriptorium.co.uk/media/system/js/keepalive-un…?551eaabec7b999f9e79fdff32f70883a
1/** 2 * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> 3 * @license GNU General Public License version 2 or later; see LICENSE.txt 4 */ 5 6/** 7 * Keepalive javascript behavior 8 * 9 * Used for keeping the session alive 10 * 11 * @package Joomla 12 * @since 3.7.0 13 */ 14!(function(){ 15 'use strict'; 16 17 document.addEventListener('DOMContentLoaded', function() { 18 19 var keepaliveOptions = Joomla.getOptions('system.keepalive'), 20 keepaliveUri = keepaliveOptions && keepaliveOptions.uri ? keepaliveOptions.uri.replace(/&/g, '&') : '', 21 keepaliveInterval = keepaliveOptions && keepaliveOptions.interval ? keepaliveOptions.interval : 45 * 1000; 22 23 // Fallback in case no keepalive uri was found. 24 if (keepaliveUri === '') 25 { 26 var systemPaths = Joomla.getOptions('system.paths'); 27 28 keepaliveUri = (systemPaths ? systemPaths.root + '/index.php' : window.location.pathname) + '?option=com_ajax&format=json'; 29 } 30 31 window.setInterval(function() { 32 Joomla.request({ 33 url: keepaliveUri, 34 onSuccess: function(response, xhr) 35 { 36 // Do nothing 37 }, 38 onError: function(xhr) 39 { 40 // Do nothing 41 } 42 }); 43 }, keepaliveInterval); 44 45 }); 46 47})(window, document, Joomla);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.