1 2var xhr = new XMLHttpRequest(); 3xhr.withCredentials = true; 4xhr.open('GET', 'https://www.norma.uz/scripts/sso?w=al&ref='+encodeURIComponent(location.href), true); 5xhr.onload = function() { 6 var data = JSON.parse(this.responseText); 7 8 function getCookie (name) { 9 let value = '; '+document.cookie; 10 let parts = value.split('; '+name+'='); 11 if (parts.length === 2) return parts.pop().split(';').shift(); 12 } 13 if (data.result == 'ok') { 14 if (data.url) { 15 location.href = data.url+'&returnUrl='+encodeURIComponent(location.href); 16 } else if (data.name) { 17 showPopover = getCookie('sso_al_close') != 1; 18 if (showPopover) { 19 // autologin 20 location.href=data.authUrl+'&returnUrl='+encodeURIComponent(location.href); 21} 22 } 23 } 24} 25 26/*xhr.onerror = function() { 27 alert( 'ÐÑибка ' + this.status ); 28}*/ 29 30xhr.send(); 31 32function ssoShowPopup(w, h) { 33 if (!w) w = 400; if (!h) h = 500; 34 var left = (screen.width/2)-(w/2), top = (screen.height/2)-(h/2); 35 var url = 'https://www.norma.uz/ru/auth/login' 36 + '?ref=' + encodeURIComponent(location.href); 37 window.open(url, 'normauz_sso', 'width='+w+',height='+h+',top='+top+',left='+left+',scrollbars=yes').focus(); 38} 39 40window.addEventListener("message", function(event) { 41 if (event.data.m == 'sso_reload' && event.data.url) { 42 if (event.origin != 'https://www.norma.uz') return; 43 location.href = event.data.url; 44 } 45}, false);
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.