美 재무부, 한국 환율 관찰 대상국으로 재지정
©(주) 데일리안 무단전재 및 재배포 금지
';
replyDiv.outerHTML = comment;
}
}
function gotoReply(){
const footerDom = document.querySelector('footer');
const replyDom = document.querySelector('#lv-container');
// console.log(document.body.scrollHeight, screen.height, footerDom.clientHeight, replyDom.clientHeight)
window.scrollTo(0, document.body.scrollHeight - footerDom.clientHeight - replyDom.clientHeight + 55)
// console.log(window.scrollY)
}
function openShares(x,y) {
console.log(x,y)
let shareDiv = document.getElementById('shareDiv');
shareDiv.style.visibility = shareDiv.style.visibility == 'hidden' ? '' : 'hidden';
shareDiv.style.top = parseInt(y - 470) + "px";
shareDiv.style.left = parseInt(x - 420) + "px";
// shareDiv.style = "top: " + parseInt(y - 470) + "px; left:" + parseInt(x - 420) + "px;";
}
var size = 'width=626 height=436';
function shareFacebook() {
window.open('https://www.facebook.com/sharer.php?u=' + window.location.href, '_blank', size);
}
function shareKakaoStory() {
window.open('https://story.kakao.com/share?url=' + window.location.href, '_blank', size);
}
function shareTwitter() {
window.open('https://twitter.com/share?url=' + window.location.href, '_blank', size);
}
function shareBand() {
//coming soon
}
Kakao.init('3e2a161efe9eff98ec0662c55f7e59dd');
//https://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.dailian.co.kr%2Fnews%2Fview%2F818152&&t=%EC%9D%BC%EA%B0%90%20%EC%B0%BE%EB%8A%94%20%EC%A6%9D%EA%B6%8C%EC%82%AC%EB%93%A4%C2%B7%C2%B7%C2%B7%EA%B0%80%EC%97%85%EC%8A%B9%EA%B3%84%20%EB%B6%80%EC%97%85%20%E2%80%98%EB%9F%AC%EC%8B%9C%E2%80%99-%EB%8D%B0%EC%9D%BC%EB%A6%AC%EC%95%88
//https://www.facebook.com/sharer.php?u=http%3A%2F%2F106.10.53.188%2Fnews%2Fview%2F804032
function socialShare(type){
var snsTitle = encodeURIComponent(document.querySelector('.news-contents .title').innerHTML);
var snsUrl = encodeURIComponent(window.location.href);
var snsSummary = "美 재무부, 한국 환율 관찰 대상국으로 재지정"
var snsImage = "http://cdnimage.dailian.co.kr/news/202506/news_1749154905_1507464_m_1.jpeg"
var snsCopy = encodeURIComponent("데일리안");
var opensns = "";
if(type == "facebook"){
opensns +="http://www.facebook.com/sharer.php?u="+snsUrl;
opensns += "&&t="+snsTitle;
openSnsWin(opensns);
} else if(type == "blog"){
openSnsWin('http://blog.naver.com/openapi/share?url='+snsUrl+'&title='+snsTitle);
} else if(type == "band"){
opensns += "\""+snsTitle+"\":"+snsUrl;
opensns += "&new_post[tags]="+snsCopy;
openSnsWin('http://www.band.us/plugin/share?body='+opensns+'&route=www.dailian.co.kr');
}else if(type == "kakao"){
// console.log("test", snsImage, snsSummary)
mUrl = "https://m.dailian.co.kr" + window.location.pathname
wUrl = "https://www.dailian.co.kr" + window.location.pathname
Kakao.Share.sendDefault({
objectType: 'feed',
content: {
title: document.querySelector('.news-contents .title').innerHTML,
description: snsSummary,
imageUrl: snsImage,
link: {
mobileWebUrl: mUrl,
webUrl: wUrl,
},
},
buttons: [
{
title: '웹으로 보기',
link: {
mobileWebUrl: mUrl,
webUrl: wUrl,
},
},
],
// 카카오톡 미설치 시 카카오톡 설치 경로이동
installTalk: true,
});
// opensns +="https://story.kakao.com/share?url="+snsUrl;
// openSnsWin(opensns);
}
else if(type == "twitter") {
opensns += "http://twitter.com/intent/tweet?text="+snsTitle+"%20@dailiannews&url="+snsUrl
openSnsWin(opensns)
}else if(type == "url"){
var urlbox = document.getElementById('urlData');
urlbox.value = location.href;
urlbox.select();
var result = document.execCommand("copy");
alert( 'URL 이 복사 되었습니다.');
}
}
function openSnsWin(opensns) {
var winObj;
winObj = window.open(opensns,"","width=560, height=520, scrollbars=yes, resizable=yes");
}
댓글 쓰기