1/* 2 * Move vs notice wrapper pre content (used for Overdrive users) 3 */ 4if (document.querySelector('.woocommerce-notices-wrapper .vs-notices-pre-content')) { 5 document.querySelector('#top-navigation-wrapper').prepend(document.querySelector('.woocommerce-notices-wrapper')); 6 document.querySelector('.vs-notices .close-notices').onclick = function () { 7 this.closest('.vs-notices-pre-content').style.maxHeight = 0; 8 }; 9 document.documentElement.classList.add('vs-notice-pre-content'); // add class to html indicating there is a vs notice, set padding top to account for sticky nav on line below 10 document.documentElement.style.setProperty('--vs-notice-height', document.querySelector('.woocommerce-notices-wrapper .vs-notices header').offsetHeight + document.querySelector('.woocommerce-notices-wrapper .vs-notices .container').offsetHeight + document.querySelector('#top-navigation-wrapper').offsetHeight + 'px'); 11} 12 13/* 14 * Add loading class to team page gform as well as send user to top of section 15 * - for better UX 16 */ 17(function ($) { 18 jQuery(document).ready(function ($) { 19 $(window).on('load', function () { 20 $('.teams-page #join-section-four').on('click', ' input[type="submit"]', function (e) { 21 $('.teams-signup-form').addClass('is-loading'); 22 location.href = '#join-section-four'; 23 }); 24 }); 25 }); 26})(jQuery); 27 28/* 29 * Adds event listeners to custom styled elements. So we can set a focus state for ADA. 30 * 31 */ 32 33function addInputFocusEventListeners(element, focusTarget) { 34 element.addEventListener('focusin', function () { 35 focusTarget.classList.add('default-focused-input'); 36 }); 37 38 element.addEventListener('focusout', function () { 39 focusTarget.classList.remove('default-focused-input'); 40 }); 41} 42 43var globalSearchEl = document.getElementById('searchform'); 44var globalNewsletterEls = document.getElementsByClassName("vidstore-newsletter-signup"); 45var focusableInputs = Array.from(globalNewsletterEls); 46 47focusableInputs.push(globalSearchEl) 48 49for (var i = 0; i < focusableInputs.length; i++) { 50 if (focusableInputs[i]) { 51 var currentInput = focusableInputs[i].querySelector("input[type='text']:first-of-type"); 52 addInputFocusEventListeners(currentInput, focusableInputs[i]); 53 } 54} 55 56/* 57 * Add final loaded class for backstop testing (or whatever else might need it) 58 * NOTE: please leave this as the final call add new code above this 59 * 60 */ 61window.addEventListener('pageshow', function () { 62 document.body.classList.add('is-loaded'); 63});
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.