1function detectBrowser() { 2 var ua = navigator.userAgent; 3 4 if (ua.indexOf("Edg/") > -1) { 5 return "Microsoft Edge " + ua.match(/Edg\/([\d.]+)/)[1]; 6 } else if (ua.indexOf("Chrome/") > -1 && ua.indexOf("Safari/") > -1) { 7 return "Google Chrome " + ua.match(/Chrome\/([\d.]+)/)[1]; 8 } else if (ua.indexOf("Firefox/") > -1) { 9 return "Mozilla Firefox " + ua.match(/Firefox\/([\d.]+)/)[1]; 10 } else if (ua.indexOf("Safari/") > -1 && ua.indexOf("Version/") > -1) { 11 return "Apple Safari " + ua.match(/Version\/([\d.]+)/)[1]; 12 } else if (ua.indexOf("MSIE") > -1 || ua.indexOf("Trident/") > -1) { 13 return "Internet Explorer"; 14 } 15 return "Unknown"; 16} 17 18function detectPlatform() { 19 // navigator.userAgentData is the modern API (Chromium-based browsers) 20 if (navigator.userAgentData && navigator.userAgentData.platform) { 21 return navigator.userAgentData.platform; 22 } 23 return navigator.platform || "Unknown"; 24} 25 26function openSystemInfo() { 27 document.getElementById("systemInfo-jsSupport").textContent = "YES"; 28 document.getElementById("systemInfo-browser").textContent = detectBrowser(); 29 document.getElementById("systemInfo-platform").textContent = detectPlatform(); 30 document.getElementById("systemInfoOverlay").style.display = "block"; 31 document.getElementById("systemInfoDialog").style.display = "block"; 32} 33 34function closeSystemInfo() { 35 document.getElementById("systemInfoOverlay").style.display = "none"; 36 document.getElementById("systemInfoDialog").style.display = "none"; 37}
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.