1document.addEventListener("DOMContentLoaded", function() { 2 let storage = localStorage.getItem("sessionlang"); 3 4 var usrlang = navigator.language || navigator.userLanguage; 5 let lang = usrlang.substring(0, 2); 6 console.log ('usrlang', usrlang, lang); 7 const regex = /(ru|uk|be)-{0,1}/gmi; 8 9 let m = regex.exec(usrlang); 10 console.log('storage', storage, 'm', m); 11 12 if (m == null && storage == null){ 13 // console.log('m == null && storage == null') 14 TranslateSetCookie(lang); 15 localStorage.setItem("sessionlang", lang); 16 window.location.reload(); 17 } 18 19 20 $('[data-google-lang]').click(function () { 21 console.log('[data-google-lang]', $(this).attr("data-google-lang")) 22 localStorage.setItem("sessionlang", $(this).attr("data-google-lang")); 23 }); 24})
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.