1$(function () { 2 $("#languageSelectorAnalytics").click(function () { 3 let logoUrl = $(this).attr("href"); 4 dataLayer.push({ 5 event: "header", 6 eventCategory: "header", 7 eventAction: "language selector", 8 eventLabel: logoUrl, 9 iconText: "language selector", 10 }); 11 }); 12 13 $(document).on("click", ".languageSet", function () { 14 let ctaText = $(this).text().trim(); 15 let nextPageURL = $(this).attr("href"); 16 let countrySelected = $(this).parent("div").siblings("h4").text().trim(); 17 if (nextPageURL == undefined) { 18 nextPageURL = ""; 19 } 20 dataLayer.push({ 21 event: "languageSelector", 22 eventCategory: "languageSelector", 23 eventAction: ctaText, 24 eventLabel: nextPageURL ? nextPageURL : "NA", 25 arrowPositions: "open", 26 country: countrySelected, 27 }); 28 }); 29 30 $(document).on("click", ".countryListClass", function () { 31 let ctaText = $(this).attr("data-attr-name"); 32 let nextPageURL = $(this).attr("href"); 33 if (nextPageURL == undefined) { 34 nextPageURL = ""; 35 } 36 dataLayer.push({ 37 event: "languageSelector", 38 eventCategory: "languageSelector", 39 eventAction: ctaText, 40 eventLabel: nextPageURL ? nextPageURL : "NA", 41 arrowPositions: "open", 42 country: "NA", 43 }); 44 }); 45 46 // $(document).on("click", ".country-name", function () { 47 // let ctaText = $(this).siblings("div").children(".languageSet").text().trim(); 48 // let nextPageURL = $(this).siblings("div").children(".languageSet").attr("href"); 49 // let countrySelected = $(this).text().trim(); 50 // if (nextPageURL == undefined) { 51 // nextPageURL = ""; 52 // } 53 // dataLayer.push({ 54 // event: "languageSelector", 55 // eventCategory: "languageSelector", 56 // eventAction: ctaText, 57 // eventLabel: nextPageURL, 58 // arrowPositions: "open", 59 // country: countrySelected, 60 // }); 61 // }); 62}); 63 64function updateImg() { 65 let updatedName1 = localStorage.getItem("flagImg"); 66 if (updatedName1) 67 $(".flag-selected").children("img").attr("src", updatedName1); 68 localStorage.removeItem("flagImg") 69} 70let one; 71let two; 72$(document).ready(function () { 73 const reHeader = $(".re-master"); 74 let updatedName = reHeader.attr("data-fullLanguageName"); 75 let updatedCountryName = reHeader.attr("data-fullCountryName"); 76 let defaultCountryCode = reHeader.attr("data-langcountry"); 77 let values = defaultCountryCode.split('_'); 78 one = values[0]; 79 two = values[1]; 80 if (typeof updatedName !== 'undefined' && typeof updatedCountryName !== 'undefined') { 81 $(".lang-selected").html(updatedName, { bypassSanitization: true }); 82 } else { 83 $(".lang-selected").html(two, { bypassSanitization: true }); 84 } 85 $(document).on("click", ".region-box a", function () { 86 $(".region-box h3").removeClass("active-red"); 87 $(this).children("h3").addClass("active-red"); 88 $(".region-select-wrapper").addClass("d-none"); 89 $(".country-select-wrapper").removeClass("d-none"); 90 $("html, body").animate({ 91 scrollTop: 0 92 }, "slow"); 93 }); 94 95 $("#back-step-region").click(function () { 96 $(".country-select-wrapper").addClass("d-none"); 97 $(".region-select-wrapper").removeClass("d-none"); 98 $("html, body").animate({ 99 scrollTop: 0 100 }, "slow"); 101 }); 102 $(".lang-option-main").click(function () { 103 $(".lang-option-main").removeClass("active-red"); 104 $(this).addClass("active-red"); 105 $(".country-name").removeClass("active-red"); 106 $(this).closest(".country-option-main").children(".country-name").addClass("active-red"); 107 let langName = $(this).val(); 108 console.log(langName); 109 110 }); 111 $(".region-wise-lang").click(function () { 112 let countryRegion = $(this).attr("data-countryregion"); 113 $(".region-name").each(function () { 114 let checkCountry = $(this).text(); 115 if (checkCountry === countryRegion) { 116 $(this).addClass("active-red"); 117 } 118 119 }); 120 }); 121 $(".countryListClass").click(function () { 122 let c = $(this).attr("data-attr"); 123 let windowSize = $(window).width(); 124 let regionName = $(this).attr("data-attr-name"); 125 let mobileimgValue = $(this).attr("data-imagem"); 126 let desktopimgValue = $(this).attr("data-imaged"); 127 let backImage = $(this).attr("data-backimage"); 128 let altTextM = $(this).attr("data-altm"); 129 let altTextD = $(this).attr("data-altd"); 130 $("#impName").html(regionName, { bypassSanitization: true }); 131 if (windowSize < 768) { 132 $(".back-image-mobile").css('background-image', 'url(' + mobileimgValue + ')'); 133 } 134 $("#mobileImageID").attr("srcset", mobileimgValue); 135 $("#desktopImageID").attr("src", desktopimgValue); 136 $("#mobileImageID").attr("alt", altTextM); 137 $("#desktopImageID").attr("alt", altTextD); 138 setDataL(c); 139 }); 140 $(document).on("click", ".languageSet", function () { 141 let flagImg = $(this).parent(".lang-option").siblings(".country-name").parent(".country-option-main").siblings("img").attr("src"); 142 console.log(flagImg); 143 localStorage.setItem("flagImg", flagImg); 144 }); 145 updateImg(); 146}); 147 148function setDataL(country) { 149 let updatedLanguage = two.toUpperCase(); 150 let templateScript = $("#handlebars-demo1").html(); 151 let template = Handlebars.compile(templateScript); 152 let data = template(JSON.parse(country)); 153 $(".countriesList").html(data, { bypassSanitization: true }); 154 $(".checkClass").each(function () { 155 let countrycode = $(this).attr("data-countrycode"); 156 countrycode = countrycode.toLowerCase(); 157 console.log(countrycode); 158 console.log(one); 159 if (countrycode == one) { 160 $(this).children(".country-name").addClass("active-red"); 161 $(this).children(".lang-option").children("." + updatedLanguage).addClass("active-red"); 162 } 163 }); 164}
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.