1/** 2 * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> 3 * @license GNU General Public License version 2 or later; see LICENSE.txt 4 */ 5 6(document => { 7 8 // Selectors used by this script 9 const debugSectionTogglerSelector = '.dbg-header'; 10 const toggleTargetAttribute = 'data-debug-toggle'; 11 12 /** 13 * Toggle an element by id 14 * @param id 15 */ 16 const toggle = id => { 17 document.getElementById(id).classList.toggle('hidden'); 18 }; 19 20 /** 21 * Register events 22 */ 23 const registerEvents = () => { 24 document.querySelectorAll(debugSectionTogglerSelector).forEach(toggler => { 25 toggler.addEventListener('click', event => { 26 event.preventDefault(); 27 toggle(toggler.getAttribute(toggleTargetAttribute)); 28 }); 29 }); 30 }; 31 document.addEventListener('DOMContentLoaded', registerEvents); 32})(document);
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.