1(function ($) { 2 "use strict"; 3 4 // Listen to the HubSpot submit event to enter the resource name to the hidden form field. 5 // Event names: onBeforeFormInit, onFormReady, onFormSubmit, onFormSubmitted. 6 window.addEventListener("message", function (event) { 7 if (typeof custom_resource_form === "object" && event.data.type === 'hsFormCallback') { 8 // Push the URL back to save the corresponding ID to the session. 9 if (event.data.eventName === 'onFormReady') { 10 var data = { 11 action: "set_session_for_url", 12 url: window.location.href 13 }; 14 $.post(custom_resource_form.ajax_url, data, function (response) { 15 console.log(response); 16 }); 17 } 18 } 19 }); 20 21 // Redirect to the form page if it is needed (wrong referer). 22 $(document).ready(function () { 23 if (typeof custom_resource_form === "object" && $("div.wrong-referer-redirect-to").length) { 24 window.location = custom_resource_form.redirect_to; 25 } 26 }); 27 28})(jQuery);
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.