1(function ($, root, undefined) { 2 3 $(function () { 4 5 'use strict'; 6 7 // DOM ready, take it away 8 9 console.log('DOM READY!!!'); 10 11 var url = location.pathname; 12 13 if (document.location.href.indexOf('learn') > -1){ 14 $(".highlighted-learn a").addClass("red-highlight"); 15 $(".highlighted-learn li a").removeClass("red-highlight"); 16 } 17 if (document.location.href.indexOf('research') > -1){ 18 $(".highlighted-research a").addClass("red-highlight"); 19 $(".highlighted-research li a").removeClass("red-highlight"); 20 } 21 if (document.location.href.indexOf('our-programs') > -1){ 22 $(".highlighted-involved a").addClass("red-highlight"); 23 $(".highlighted-involved li a").removeClass("red-highlight"); 24 $(".highlighted-programs a").addClass("red-highlight"); 25 $(".highlighted-programs li a").removeClass("red-highlight"); 26 } 27 if (document.location.href.indexOf('donation-center-locations') > -1){ 28 $(".highlighted-locations a").addClass("red-highlight"); 29 $(".highlighted-locations li a").removeClass("red-highlight"); 30 } 31 32 // GTranslate tweaks: 33 34 const params = new URLSearchParams(window.location.search); 35 const lang = params.get("lang"); 36 37 if (lang) { 38// console.log("[GT] Tweaking GTranslate..."); 39 40 const gtSelectors = document.querySelectorAll(".gt_selector"); 41 42 if (!gtSelectors.length) return; 43 44 const firstSelector = gtSelectors[0]; 45 46 // trigger hover only for the first select 47 firstSelector.dispatchEvent( 48 new PointerEvent("pointerenter", { bubbles: true }) 49 ); 50 51// console.log("[GT] lang param is set to:", lang); 52 53 setTimeout(function () { 54 const value = "en|" + lang; 55 56 // set value for ALL selects (desktop + mobile) 57 gtSelectors.forEach(function (el) { 58 el.value = value; 59 }); 60 61 // fire change only on the first one 62// console.log("[GT] Changing select value and firing change event!", value); 63 firstSelector.dispatchEvent(new Event("change")); 64 }, 1000); 65 } 66 }); 67 68})(jQuery, this);
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.