CoreFiles by mySites.guru
default.php49 lines, 1,654 bytes, from Joomla_5.3.0-Stable-Full_Package.zip
Raw History Compare with 5.2.6
md5
950c5d4e7df8c6502f991b2a1133c05a
sha1
8cdd9487cf4add391155c9203d971c9c4d84381d
sha256
286d855d3f730c7c0e7b08aa2bda288d76347b543eb6f876337ff7c8c2003cad
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  mod_stats_admin
 *
 * @copyright   (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

\Joomla\CMS\Factory::getApplication()->getDocument()->addScriptDeclaration('
(function() {
	document.addEventListener(\'DOMContentLoaded\', function() {
		var elms = document.querySelectorAll("a.js-revert");

		if (elms.length) {
			elms.forEach(function(el) {
				el.addEventListener("click", function(e) {
					e.preventDefault();
					e.stopPropagation();

					var activeTab = [];
					activeTab.push("#" + e.target.href.split("#")[1]);
					var path = window.location.pathname;
					localStorage.removeItem(e.target.href.replace(/&return=[a-zA-Z0-9%]+/, "").replace(/&[a-zA-Z-_]+=[0-9]+/, ""));
					localStorage.setItem(path + e.target.href.split("index.php")[1].split("#")[0], JSON.stringify(activeTab));
					return window.location.href = e.target.href.split("#")[0];
				});
			});
		}
	});
})();
');
?>
<ul class="list-group list-group-flush stats-module">
    <?php foreach ($list as $item) : ?>
        <li class="list-group-item">
            <span class="me-2 icon-<?php echo $item->icon; ?> icon-fw" aria-hidden="true"></span> <?php echo $item->title; ?>

            <?php if (isset($item->link)) : ?>
                <a class="btn btn-info btn-sm js-revert" href="<?php echo $item->link; ?>"><?php echo $item->data; ?></a>
            <?php else : ?>
                <?php echo $item->data; ?>
            <?php endif; ?>
        </li>
    <?php endforeach; ?>
</ul>

The same content is in 230 releases, Joomla 4.2.0-beta3 to 6.2.1-rc1. See them all, or every version of this file.