1document.addEventListener('DOMContentLoaded', function() { 2 document.querySelectorAll('.cb-code-executable .process').forEach(function(process) { 3 var activator = function(node, event){ 4 var classNames = node.className.split(' '); 5 var matches = classNames.map(function(string) { 6 return string.match('action--(\\d+)') 7 }); 8 var validMatch = matches.find(function(match) { 9 return match !== null; 10 }); 11 if(!validMatch) { 12 return 13 } 14 var index = validMatch[1]; 15 process.querySelectorAll('.is-active').forEach(function(node) { 16 node.classList.remove('is-active'); 17 }); 18 process.classList.add('is-active'); 19 node.classList.add('is-active') 20 process.querySelector('.process__section--content .info_content--' + index).classList.add('is-active'); 21 }; 22 var mouseOverListener = function(node, event) { 23 if(window.innerWidth >= 1024) { 24 activator(node, event); 25 } 26 }; 27 var clickListener = function(node, event) { 28 if(window.innerWidth < 1024) { 29 activator(node, event); 30 } 31 }; 32 process.querySelectorAll('.alternative, .action').forEach(function(node){ 33 node.addEventListener('mouseover', mouseOverListener.bind(null, node)); 34 node.addEventListener('click', clickListener.bind(null, node)); 35 }); 36 process.querySelectorAll('.info-toggle, .info-overlay').forEach(function(toggle){ 37 toggle.addEventListener('click', function(){ 38 process.classList.remove('is-active'); 39 process.querySelectorAll('.is-active').forEach(function(node) { 40 node.classList.remove('is-active'); 41 }); 42 process.querySelector('.info_content--default').classList.add('is-active'); 43 }); 44 }); 45 }); 46});
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.