1function cosmosfarm_share_is_mobile(){ 2 var mobile = new Array('iPhone', 'iPad', 'iPod', 'BlackBerry', 'Android', 'Windows CE', 'LG', 'MOT', 'SAMSUNG', 'SonyEricsson', 'Opera Mini', 'IEMobile'); 3 for(var word in mobile){ 4 if(navigator.userAgent.match(mobile[word]) != null) return true; 5 } 6 return false; 7} 8function cosmosfarm_share_naver(url, text){ 9 var w = 720; 10 var h = 720; 11 var popup = window.open("http://share.naver.com/web/shareView.nhn?url="+encodeURIComponent(url)+"&title="+encodeURIComponent(text), 'cosmosfarm_share', 'width='+w+',height='+h+',left='+(screen.availWidth-w)*0.5+',top='+(screen.availHeight-h)*0.5); 12 return false; 13} 14function cosmosfarm_share_facebook(url){ 15 var w = 720; 16 var h = 350; 17 jQuery.post('https://graph.facebook.com', {id:encodeURI(url),scrape:true}); 18 window.open('https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(url), 'cosmosfarm_share', 'width='+w+',height='+h+',left='+(screen.availWidth-w)*0.5+',top='+(screen.availHeight-h)*0.5); 19 return false; 20} 21function cosmosfarm_share_twitter(url, text){ 22 var w = 720; 23 var h = 350; 24 window.open('https://twitter.com/intent/tweet?text='+encodeURIComponent(text)+'&url='+encodeURIComponent(url), 'cosmosfarm_share', 'width='+w+',height='+h+',left='+(screen.availWidth-w)*0.5+',top='+(screen.availHeight-h)*0.5); 25 return false; 26} 27function cosmosfarm_share_band(url, text){ 28 var w = 410; 29 var h = 540; 30 window.open('http://www.band.us/plugin/share?body='+encodeURIComponent(text)+encodeURIComponent("\n")+encodeURIComponent(url)+'&route='+encodeURIComponent(url), 'cosmosfarm_share', 'width='+w+',height='+h+',left='+(screen.availWidth-w)*0.5+',top='+(screen.availHeight-h)*0.5); 31 return false; 32} 33function cosmosfarm_share_kakaostory(url, text){ 34 Kakao.Story.share({ 35 url: encodeURI(url), 36 text: text 37 }); 38 return false; 39} 40function cosmosfarm_share_kakaotalk(url, text){ 41 if(cosmosfarm_share_is_mobile()){ 42 if(jQuery('meta[property="og:image"]').last().attr('content')){ 43 Kakao.Link.sendTalkLink({ 44 label: text, 45 image:{ 46 src: encodeURI(jQuery('meta[property="og:image"]').last().attr('content')), 47 width: jQuery('meta[property="og:image:width"]').last().attr('content')?jQuery('meta[property="og:image:width"]').last().attr('content'):'100', 48 height: jQuery('meta[property="og:image:height"]').last().attr('content')?jQuery('meta[property="og:image:height"]').last().attr('content'):'100' 49 }, 50 webLink:{ 51 text: 'ì 체보기', 52 url: encodeURI(url) 53 } 54 }); 55 } 56 else{ 57 Kakao.Link.sendTalkLink({ 58 label: text, 59 webLink:{ 60 text: 'ì 체보기', 61 url: encodeURI(url) 62 } 63 }); 64 } 65 } 66 else{ 67 alert('ì¹´ì¹´ì¤í¡ì´ ì¤ì¹ë 모ë°ì¼ììë§ ê°ë¥í©ëë¤.'); 68 } 69 return false; 70} 71function cosmosfarm_share_google(url){ 72 var w = 600; 73 var h = 600; 74 window.open('https://plus.google.com/share?url='+encodeURIComponent(url), 'cosmosfarm_share', 'width='+w+',height='+h+',left='+(screen.availWidth-w)*0.5+',top='+(screen.availHeight-h)*0.5); 75 return false; 76} 77function cosmosfarm_share_line(url, text){ 78 if(cosmosfarm_share_is_mobile()){ 79 var w = 410; 80 var h = 540; 81 window.open('http://line.me/R/msg/text/?'+encodeURIComponent(text)+encodeURIComponent("\n")+encodeURIComponent(url), 'cosmosfarm_share', 'width='+w+',height='+h+',left='+(screen.availWidth-w)*0.5+',top='+(screen.availHeight-h)*0.5); 82 } 83 else{ 84 alert('ë¼ì¸ì´ ì¤ì¹ë 모ë°ì¼ììë§ ê°ë¥í©ëë¤.'); 85 } 86 return false; 87} 88function cosmosfarm_share(sns, url, title){ 89 switch(sns){ 90 case 'naver': cosmosfarm_share_naver(url, title); break; 91 case 'facebook': cosmosfarm_share_facebook(url); break; 92 case 'twitter': cosmosfarm_share_twitter(url, title); break; 93 case 'band': cosmosfarm_share_band(url, title); break; 94 case 'kakaostory': cosmosfarm_share_kakaostory(url, title); break; 95 case 'kakaotalk': cosmosfarm_share_kakaotalk(url, title); break; 96 case 'google': cosmosfarm_share_google(url); break; 97 case 'line': cosmosfarm_share_line(url, title); break; 98 } 99 return false; 100}
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.