1function mabInteractions() { 2 const maxInteractions = function ( container ) { 3 4 container.querySelectorAll("[data-interactions]").forEach((element) => { 5 const interactionsAttr = element.getAttribute('data-interactions') 6 const interactions = interactionsAttr ? JSON.parse(interactionsAttr) : {} 7 8 interactions.forEach((interaction) => { 9 let runOnce = interaction.runOnce; 10 11 switch (interaction.trigger) { 12 case "max_countdown:end": 13 case "max_slide_menu:expand": 14 case "max_slide_menu:collapse": 15 case "max_unfold:expand": 16 case "max_unfold:collapse": 17 case "max_lottie:complete": 18 case "max_modal_popup:open": 19 case "max_modal_popup:close": 20 case "max_offcanvas:open": 21 case "max_offcanvas:close": 22 23 let interactionTrigger = interaction.trigger; 24 25 const mabElementsEventListener = () => { 26 bricksInteractionCallbackExecution(element, interaction); 27 28 if ( runOnce ) { 29 element.removeEventListener(interactionTrigger, mabElementsEventListener) 30 } 31 } 32 33 element.addEventListener(interactionTrigger, mabElementsEventListener) 34 35 break; 36 } 37 }); 38 }); 39 } 40 41 maxInteractions(document); 42 43 // Expose function 44 window.doMaxInteractions = maxInteractions; 45} 46 47document.addEventListener("DOMContentLoaded", () => { 48 bricksIsFrontend&&mabInteractions() 49});
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.