1function getAttributeByRegex(element, regex) { 2 const attributes = element.attributes; 3 for (let i = attributes.length - 1; i >= 0; i--) { 4 const attr = attributes[i]; 5 if (regex.test(attr.name)) { 6 return true; 7 } 8 } 9} 10 11function clickKingDOMLoadedCheck(event) { 12 if (window.kingDOMInitialized) { 13 window.removeEventListener('click', clickKingDOMLoadedCheck) 14 } 15 16 // Cancel click if it has a KingDOM attribute and KingDOM is not loaded 17 const hasKingDOMAttribute = getAttributeByRegex(event.target, /^data-kingdom/) 18 if (hasKingDOMAttribute) { 19 event.preventDefault(); 20 return false 21 } 22} 23 24window.addEventListener('click', clickKingDOMLoadedCheck)
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.