1var g_bInitKakao = false; 2 3function InitKakao(strKey){ 4 if( !g_bInitKakao ){ 5 6 try{ 7 if( Kakao ){ 8 Kakao.init(strKey); 9 }; 10 }catch(e){}; 11 12 g_bInitKakao = true; 13 } 14} 15 16function SendSNS(sns, title, url, image, bMobile){ 17 18 var o; 19 var _url = encodeURIComponent(url); 20 var _title = encodeURIComponent(title); 21 var _br = encodeURIComponent('\r\n'); 22 23 switch(sns){ 24 case 'facebook': 25 o = { 26 method:'popup', 27 height:600, 28 width:800, 29 url:'http://www.facebook.com/sharer/sharer.php?u=' + _url 30 }; 31 break; 32 33 case 'twitter': 34 o = { 35 method:'popup', 36 height:750, 37 width:500, 38 url:'http://twitter.com/intent/tweet?text=' + _title + '&url=' + _url 39 }; 40 break; 41 42 case 'naverband': 43 if( bMobile ){ 44 o = { 45 method:'web2app', 46 param:'create/post?text=' + _title + _br + _url, 47 a_store:'itms-apps://itunes.apple.com/app/id542613198?mt=8', 48 g_store:'market://details?id=com.nhn.android.band', 49 a_proto:'bandapp://', 50 g_proto:'scheme=bandapp;package=com.nhn.android.band' 51 }; 52 } 53 else{ 54 o = { 55 method:'popup', 56 height:700, 57 width:750, 58 url:'http://band.us/plugin/share?body=' + _title + _br + _url + '&route=' + _url 59 }; 60 } 61 break; 62 63 case 'naverblog': 64 o = { 65 method:'popup', 66 height:600, 67 width:750, 68 url:'https://share.naver.com/web/shareView.nhn?url=' + _url + '&title=' + _title 69 }; 70 break; 71 72 case 'telegram': 73 o = { 74 method:'popup', 75 height:600, 76 width:750, 77 url:'https://telegram.me/share/url?url=' + _url + '&text=' + _title 78 }; 79 break; 80 81 case 'copyurl': 82 let tempInput = document.createElement("input") 83 tempInput.value = url; 84 document.body.appendChild(tempInput); 85 tempInput.select(); 86 document.execCommand("copy"); 87 document.body.removeChild(tempInput); 88 alert('copied URL - ' + url); 89 return; 90 91 default: 92 return false; 93 } 94 95 switch(o.method){ 96 case 'popup': 97 if( o.height > 0 && o.width > 0 ){ 98 window.open(o.url,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height='+o.height+',width='+o.width); 99 } 100 else{ 101 window.open(o.url); 102 } 103 104 break; 105 106 case 'web2app': 107 if(navigator.userAgent.match(/android/i)){ 108 setTimeout(function(){ location.href = 'intent://' + o.param + '#Intent;' + o.g_proto + ';end'}, 100); 109 } 110 else if(navigator.userAgent.match(/(iphone)|(ipod)|(ipad)/i)){ 111 setTimeout(function(){ location.href = o.a_store; }, 200); 112 setTimeout(function(){ location.href = o.a_proto + o.param }, 100); 113 } 114 else{ 115 alert('Only Mobile'); 116 } 117 break; 118 } 119}
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.