1(function($){ 2 3 4/*--------------------------------------------- 5 Check Handy 6 ---------------------------------------------*/ 7 8/* ãã³ããã«ã端æ«(ã¹ãããã¿ãã¬ãã)ã®å ´åã¯ãhtmlã¿ã°ã«ãhandyãã¨ããclassãä»ãã */ 9var nut = navigator.userAgent.toLowerCase(); 10if(handy()) $("html").addClass("handy"); 11 12//ã¯ã¨ãªã¼æå®ã§handyå 13var queries = window.location.search.split('?')[1]; 14var query = []; 15if(queries){ 16 query[0] = queries.slice(0); 17 if(queries.indexOf('&')!= -1){ 18 query = queries.split('&'); 19 } 20 for(var i=0;i< query.length;i++){ 21 var key = query[i].split('=')[0]; 22 var value = query[i].split('=')[1]; 23 query[key] = value; 24 } 25 if(query){ 26 if(query['test']=='handy'){ 27 $("html").addClass("handy"); 28 } 29 } 30} 31 32//ãã¹ãç¨ 33//$("html").addClass("handy"); 34 35})(jQuery); 36 37 38 39//ãã³ããã«ã端æ«å¤å® 40function handy() 41{ 42 var flg=0; 43 var UA = navigator.userAgent; 44 if 45 ( 46 (UA.indexOf('iPhone') !== -1) 47 || ((UA.indexOf('Android') !== -1) && (UA.indexOf('Mobile') !== -1)) 48 || (UA.indexOf('Windows Phone') !== -1) 49 || (UA.indexOf('Windows CE') !== -1) 50 || (UA.indexOf('BlackBerry') !== -1) 51 || (UA.indexOf('Mobile') !== -1) 52 || (UA.indexOf('Tablet') !== -1) 53 ) 54 { 55 flg=1; 56 } 57 58 return flg; 59} 60 61
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.