You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
5.8 KiB

{"version":3,"sources":["common.js"],"names":["$","click","e","preventDefault","toggleClass","console","log","code","this","attr","snsimages","snsTitle","url","Kakao","init","Link","createDefaultButton","container","objectType","content","title","description","imageUrl","imageWidth","imageHeight","link","mobileWebUrl","document","URL","webUrl","buttons","encodeURIComponent","window","open","$div","append","val","select","execCommand","alert","remove","err"],"mappings":"AAAAA,EAAE,WACEA,EAAE,+BAA+BC,MAAM,SAASC,GAC5CA,EAAEC,iBAEFH,EAAE,qBAAqBI,YAAY,YAGvCJ,EAAE,6BAA6BC,MAAM,SAASC,GAC1CA,EAAEC,iBACFE,QAAQC,IAAI,GAEZ,IAAIC,EAAOP,EAAEQ,MAAMC,KAAK,aACpBC,EAAYV,EAAEQ,MAAMC,KAAK,cACzBE,EAAYX,EAAEQ,MAAMC,KAAK,cACzBG,EAAMZ,EAAEQ,MAAMC,KAAK,YAEvB,GAAKG,GAAQL,GAASI,EAAtB,CAGA,GAAY,cAATJ,EA2BC,OA1BAM,MAAMC,KAAK,yCAEXD,MAAME,KAAKC,oBAAoB,CAC3BC,UAAW,kBACXC,WAAY,OACZC,QAAS,CACLC,MAAOT,EACPU,YAAa,gBACbC,SAAUZ,EACVa,WAAY,IACZC,YAAa,IACbC,KAAM,CACFC,aAAcC,SAASC,IACvBC,OAAQF,SAASC,MAGzBE,QAAS,CACL,CACIV,MAAO,SACPK,KAAM,CACFC,aAAcC,SAASC,IACvBC,OAAQF,SAASC,SAOhC,GAAa,QAATrB,EAAJ,CAiBL,OAAOA,GACH,IAAK,UAEDK,EAAM,mCAAmCmB,mBAAmBpB,GAAU,QAAQoB,mBAAmBnB,GACjG,MAEJ,IAAK,WAEDA,EAAM,qCAAqCmB,mBAAmBnB,GAC9D,MAEJ,IAAK,WAEDA,EAAM,0CAA0CmB,mBAAmBnB,GAAK,MAAMD,EAC9E,MAEJ,IAAK,aAEDC,EAAM,qCAAqCmB,mBAAmBnB,GAC9D,MAEJ,IAAK,YAEDA,EAAM,gDAAgDmB,mBAAmBnB,GAAK,UAAUmB,mBAAmBpB,GAC3G,MAEJ,IAAK,YAEDC,EAAM,wCAAwCmB,mBAAmBpB,GAAU,MAAMoB,mBAAmBnB,GACpG,MAEJ,IAAK,SAEDA,EAAM,+BAA+BA,EACrC,MAEJ,IAAK,YAEDA,EAAM,8CAA8CA,EAAI,UAAUF,EAAU,gBAAgBqB,mBAAmBpB,GAIvHqB,OAAOC,KAAKrB,EAAI,GAAG,4DA3Dd,CACD,IAAIsB,EAAOlC,EAAE,WAAWS,KAAK,YAAY,aACzCT,EAAE,QAAQmC,OAAOD,GACjBA,EAAKE,IAAIxB,GAAKyB,SAEdrC,EAAE,gBAAgBqC,SAClB,IACqBV,SAASW,YAAY,QACtCC,MAAM,2CACNL,EAAKM,SACP,MAAOC,GACLF,MAAM,sBACNL,EAAKM","sourcesContent":["$(function() {\r\n $('[data-button=\"toggle-menu\"]').click(function(e) {\r\n e.preventDefault();\r\n\r\n $('#mobile-left-menu').toggleClass('opened');\r\n })\r\n\r\n $('[data-button=\"share-sns\"]').click(function(e) {\r\n e.preventDefault();\r\n console.log(1);\r\n\r\n var code = $(this).attr('data-type')\r\n var snsimages = $(this).attr('data-image')\r\n var snsTitle = $(this).attr('data-title')\r\n var url = $(this).attr('data-url')\r\n\r\n if(! url || !code || !snsTitle)\r\n return;\r\n\r\n if(code === \"kakaotalk\") {\r\n Kakao.init('3bec2345a029972a68f8279879478ba7');\r\n\r\n Kakao.Link.createDefaultButton({\r\n container: '#npsShKakaoTalk',\r\n objectType: 'feed',\r\n content: {\r\n title: snsTitle,\r\n description: '출처 : 국민연금 온에어',\r\n imageUrl: snsimages,\r\n imageWidth: 620,\r\n imageHeight: 350,\r\n link: {\r\n mobileWebUrl: document.URL,\r\n webUrl: document.URL\r\n }\r\n },\r\n buttons: [\r\n {\r\n title: '콘텐츠 보기',\r\n link: {\r\n mobileWebUrl: document.URL,\r\n webUrl: document.URL\r\n }\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n else if (code === 'url') {\r\n var $div = $('<input>').attr('data-temp','clipboard')\r\n $('body').append($div);\r\n $div.val(url).select();\r\n\r\n $('#textbox-url').select();\r\n try {\r\n var successful = document.execCommand('copy');\r\n alert('클립보드에 주소가 복사되었습니다. Ctrl + V 로 붙여넣기 하세요.');\r\n $div.remove();\r\n } catch (err) {\r\n alert('이 브라우저는 지원하지 않습니다.');\r\n $div.remove();\r\n }\r\n return;\r\n }\r\n\r\n switch(code) {\r\n case \"twitter\":\r\n //트위터\r\n url = '//twitter.com/intent/tweet?text='+encodeURIComponent(snsTitle)+'&url='+encodeURIComponent(url);\r\n break;\r\n\r\n case \"telegram\":\r\n //텔레그램\r\n url = 'https://telegram.me/share/url?url='+encodeURIComponent(url);\r\n break;\r\n\r\n case \"facebook\":\r\n //페이스북\r\n url = '//www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(url)+'&t='+snsTitle;\r\n break;\r\n\r\n case \"kakaostory\":\r\n //카카오스토리\r\n url = 'https://story.kakao.com/share?url='+encodeURIComponent(url);\r\n break;\r\n\r\n case \"naverblog\":\r\n //네이버\r\n url = 'http://share.naver.com/web/shareView.nhn?url='+encodeURIComponent(url)+'&title='+encodeURIComponent(snsTitle);\r\n break;\r\n\r\n case \"naverband\":\r\n //밴드\r\n url = 'http://www.band.us/plugin/share?body='+encodeURIComponent(snsTitle)+'%0A'+encodeURIComponent(url);\r\n break;\r\n\r\n case \"google\":\r\n //구글\r\n url = '//plus.google.com/share?url='+url;\r\n break;\r\n\r\n case \"pinterest\":\r\n //pinterest\r\n url = '//www.pinterest.com/pin/create/button/?url='+url+'&media='+snsimages+'&description='+encodeURIComponent(snsTitle);\r\n break;\r\n }\r\n\r\n window.open(url,'','width=600,height=300,top=100,left=100,scrollbars=yes');\r\n\r\n })\r\n})\r\n"],"file":"common.min.js"}