1(function($){ 2$(function(){ 3var user_agent=navigator.userAgent; 4var is_opera_edge; 5var browser=user_agent.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))/i)||[]; 6var browser_name=''; 7var browser_class=''; 8if(/trident/i.test(browser[0])){ 9browser_name='ie'; 10}else if(browser[0]==='Chrome'){ 11is_opera_edge=user_agent.match(/\b(OPR|Edge)/); 12if(is_opera_edge!==null){ 13browser_name=is_opera_edge[0].replace('OPR', 'opera'); 14}} 15if(''===browser_name){ 16if('standalone' in window.navigator&&!window.navigator.standalone){ 17browser_name='uiwebview'; 18}else{ 19browser_name=browser[0]&&''!==browser[0] ? browser[0]:navigator.appName; 20}} 21browser_name=browser_name.toLowerCase(); 22switch(browser_name){ 23case 'msie' : 24browser_class='ie'; 25break; 26case 'firefox' : 27browser_class='gecko'; 28break; 29default : 30browser_class=browser_name; 31break; 32} 33if(user_agent.match(/iPhone/)){ 34browser_class +=' iphone'; 35} 36$('body').addClass(browser_class); 37}); 38})(jQuery);
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.