1window.on = function (eventName, selector, callback) { 2 eventName = eventName == "hover" ? "mouseenter" : eventName; 3 4 window.addEventListener("load", function () { 5 const elements = document.querySelectorAll("[data-id='" + selector + "']"); 6 const fallbackElements = document.querySelectorAll(selector); 7 8 if (elements.length) { 9 elements.forEach(function (element) { 10 element.addEventListener(eventName, callback); 11 }); 12 } else if (fallbackElements.length) { 13 fallbackElements.forEach(function (element) { 14 element.addEventListener(eventName, callback); 15 }); 16 } else { 17 console.debug("Could not find any elements with selector:", selector); 18 } 19 }); 20};
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.