1OriconContentSelector = { 2 checkDevice: function() { 3 var ua = navigator.userAgent; 4 if(ua.indexOf('iPhone') >= 0 || ua.indexOf('iPod') >= 0 || ua.indexOf('Android') >= 0 && ua.indexOf('Mobile') >= 0){ 5 return "sp"; 6 } else if (ua.indexOf('iPad') >= 0 || ua.indexOf('Android') >= 0 && ua.indexOf('Mobile') < 0 ){ 7 return "tab"; 8 } else { 9 return "pc"; 10 } 11 }, 12 13 changeSP: function() { 14 OriconContentSelector.setCookie("os_change_display_pcsp", "0"); 15 location.reload(); 16 }, 17 18 changePC: function() { 19 OriconContentSelector.setCookie("os_change_display_pcsp", "1"); 20 location.reload(); 21 }, 22 23 //Set Cookie 24 setCookie: function(key,val) { 25 tmp = key+"="+escape(val)+";"; 26 tmp += "path=/"; 27 document.cookie = tmp; 28 }, 29 30 //Get Cookie 31 getCookie: function(key) { 32 tmp = document.cookie+";"; 33 tmp1 = tmp.indexOf(key,0); 34 if(tmp1 != -1){ 35 tmp = tmp.substring(tmp1,tmp.length); 36 start = tmp.indexOf("=",0); 37 end = tmp.indexOf(";",start); 38 return(unescape(tmp.substring(start+1,end))); 39 } 40 return(""); 41 }, 42 43 //Delete Cookie 44 delCookie: function(key){ 45 expiredate = new Date(); 46 expiredate.setYear(expiredate.getYear()-1); 47 tmp = key+"=; path=/"; 48 tmp += "expires="+expiredate.toGMTString(); 49 document.cookie = tmp; 50 } 51}; 52
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.