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.
 
 
 
 

2 lines
2.0 KiB

$(function(){$('[data-button="toggle-menu"]').click(function(e){e.preventDefault(),$("#mobile-left-menu").toggleClass("opened")}),$('[data-button="share-sns"]').click(function(e){e.preventDefault(),console.log(1);var t=$(this).attr("data-type"),o=$(this).attr("data-image"),a=$(this).attr("data-title"),n=$(this).attr("data-url");if(n&&t&&a){if("kakaotalk"===t)return Kakao.init("3bec2345a029972a68f8279879478ba7"),void Kakao.Link.createDefaultButton({container:"#npsShKakaoTalk",objectType:"feed",content:{title:a,description:"출처 : 국민연금 온에어",imageUrl:o,imageWidth:620,imageHeight:350,link:{mobileWebUrl:document.URL,webUrl:document.URL}},buttons:[{title:"콘텐츠 보기",link:{mobileWebUrl:document.URL,webUrl:document.URL}}]});if("url"!==t){switch(t){case"twitter":n="//twitter.com/intent/tweet?text="+encodeURIComponent(a)+"&url="+encodeURIComponent(n);break;case"telegram":n="https://telegram.me/share/url?url="+encodeURIComponent(n);break;case"facebook":n="//www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(n)+"&t="+a;break;case"kakaostory":n="https://story.kakao.com/share?url="+encodeURIComponent(n);break;case"naverblog":n="http://share.naver.com/web/shareView.nhn?url="+encodeURIComponent(n)+"&title="+encodeURIComponent(a);break;case"naverband":n="http://www.band.us/plugin/share?body="+encodeURIComponent(a)+"%0A"+encodeURIComponent(n);break;case"google":n="//plus.google.com/share?url="+n;break;case"pinterest":n="//www.pinterest.com/pin/create/button/?url="+n+"&media="+o+"&description="+encodeURIComponent(a)}window.open(n,"","width=600,height=300,top=100,left=100,scrollbars=yes")}else{var r=$("<input>").attr("data-temp","clipboard");$("body").append(r),r.val(n).select(),$("#textbox-url").select();try{document.execCommand("copy");alert("클립보드에 주소가 복사되었습니다. Ctrl + V 로 붙여넣기 하세요."),r.remove()}catch(e){alert("이 브라우저는 지원하지 않습니다."),r.remove()}}}})});
//# sourceMappingURL=common.min.js.map