';
var articleText = $('.news_page_txt').html();
var splitText = articleText.split('[기자]', 2);
var joinText = articleAd + '[기자]';
var brIdx = $('.news_page_txt br').last().index();
var brList = $('.news_page_txt').find('br');
console.log(brList);
if(splitText.length == 2) {
var html = splitText.join(joinText);
$('.news_page_txt').html(html);
} else {
if(brList.length < 4) {
$('.news_page_txt').append(articleAd);
} else {
brList.eq(3).after(articleAd);
}
/*
if(brIdx < 30) {
$('.news_page_txt').append(articleAd);
} else {
$('.news_page_txt').eq(30).after(articleAd);
}
*/
}
//글자 크기조절
var fontsize = 18;
$('#btn_big').on("click", function(e){
fontsize+=2;
var lineheight = fontsize * 1.5;
$('.news_page_txt').attr('style', "font-size:" + fontsize + "px;line-height:" + lineheight + "px;");
});
$('#btn_small').on("click", function(e){
fontsize-=2;
var lineheight = fontsize * 1.5;
$('.news_page_txt').attr('style', "font-size:" + fontsize + "px;line-height:" + lineheight + "px;");
});
//재생목록 토글
var img = document.getElementById("Toggle");
if(img != null) {
img.addEventListener("click", function(){
/* console.log( this ); */
if(img.src == "http://image.ichannela.com/images/common/loop_play_on.png") {
this.src = "http://image.ichannela.com/images/common/loop_play_off.png";
this.className = "loop_play_off";
}else{
this.src= "http://image.ichannela.com/images/common/loop_play_on.png";
this.className = "loop_play_on";
}
});
//재생목록 현재 재생중 영상으로 스크롤
var offset = $("#now_play").position();
console.log('['+offset.top+']');
$('.news_list_side > ul').animate({scrollTop : offset.top - 310}, 200)
}
//댓글 불러오기
selectCommentList();
//댓글 등록 버튼 클릭 시
$("#insertComment").on("click", function(){
insertComment();
});
$('#faq').on("click", function(e){
window.open("/com/cmm/custom_faq.do");
return false;
});
// 인터넷 기사인 경우 연속 재생 토글 display none 으로 설정.
var pgmId = "WPGI00006";
if (pgmId == "WPGI00006"){
$("#continuePlay").hide();
}
const imgElement = document.querySelector('#img_0 img');
if (imgElement != undefined && imgElement.src){
changeNotExistImageToDefaultImage(imgElement);
}
});
function changeNotExistImageToDefaultImage(imageElement){
var imageUrl = imageElement.src;
var img = new Image();
img.src = imageUrl;
img.onload = function() {
// console.log('Width:', this.naturalWidth);
// console.log('Height:', this.naturalHeight);
};
img.onerror = function() {
// console.log('Image Failed:', imageUrl);
imageElement.src = 'http://image.ichannela.com/tc_image/default.jpg';
};
}
// 뉴스 상세 공유 버튼 적용
function snsShare(media) {
var sendUrl;
var title = '[채널A] 엑소 첸백시, 日 오리콘차트 2위 진입';
var description = '
25일 일본 최대 음반 집계사이트 오리콘 스타일에 따르면 지난 24일 발매된 엑소 첸백시의 일본 '.replaceAll(' ', ' ');
var locUrl1 = window.location.href;
var locUrl2 = window.location.href;
switch(media) {
case 'kakao':
if(!Kakao.isInitialized()) {
// Kakao.init('ddf881d12e66854b6e419a878f9e6ba2');
Kakao.init('72603375acb82a7c011f2de266a76b2b');
}
Kakao.Share.sendDefault({
objectType: 'feed',
content: {
title: title,
description: description,
imageUrl: 'http://image.ichannela.com/images/channela/2017/05/25/000000396285/00000039628520170525144823225.jpg',
link: {
webUrl: locUrl1,
mobileWebUrl: locUrl1
}
}
});
break;
case 'twitter':
sendUrl = "http://twitter.com/home?status="+encodeURIComponent(title)+"+"+encodeURIComponent(locUrl1);
openNewsWin(sendUrl);
break;
case 'facebook':
sendUrl = "http://m.facebook.com/sharer.php?u="+encodeURIComponent(locUrl2);
openNewsWin2(sendUrl);
break;
case 'url':
var textarea = document.createElement('textarea');
document.body.appendChild(textarea);
textarea.value = locUrl1;
textarea.select();
document.execCommand('Copy');
document.body.removeChild(textarea);
alert("주소가 복사되었습니다. 원하는 곳에 붙여넣기(Ctrl+V) 해주세요.");
break;
}
}
function openNewsWin2(openUrl) {
var winObj;
winObj = window.open(openUrl,"recom_icon_pop","width=400, height=364, scrollbars=no, resizable=no");
}
function openNewsWin(openUrl) {
var winObj;
winObj = window.open(openUrl,"sendNewsWin","width=1024, height=800");
}
function video_player(x, y) {
// TEMP
}
//댓글 리스트 가져오기!
function selectCommentList(){
var urlParams = new URL(location.href).searchParams;
var publishId = urlParams.get('publishId');
var url = "/news/comment/commentlist.do";
var data = {"com_bno": publishId};
var blockYN = 'N';
// '/news/main/news_detailPage.do?publishId=000000368193' 페이지 댓글 차단.
var blockList = ['000000368193', '000000374341', '000000374342', '000000374510', '000000374555', '000000374584', '000000374588',
'000000374596', '000000374607', '000000374608', '000000374714']; // 댓글 차단할 퍼블리싱 ID 추가
//if (!blockList.includes(publishId)) {
if(blockYN != 'Y') {
$.ajax({
url: url,
type: 'POST',
data: data,
success: function(data){
var icon_url = {cha: "/publish/images/icon/ico_cha.png",
naver: "/publish/images/icon/ico_naver.png",
kakao: "/publish/images/icon/ico_kakao.png"
}
//console.log("댓글 리스트 데이터"+data.comment_list);
//console.log("댓글 갯수"+data.totalCount);
var comment_count = "댓글 " + data.totalCount + "개";
$("#reply_sum").html(comment_count);
if(data.comment_list !== undefined && data.comment_list !== ""){
var comment_list = data.comment_list.reverse();
}
var html = "";
var result = data.result;
//console.log("댓글 리스트 결과 : " + result);
if(result === 1){
for (var i = 0; i";
html += '
';
html += '
';
html += '';
html += '';
html += '';
html += ''+user_name+'';
html += ''+date+'';
html += '
';
html += '
';
if(comment_user_id === session_user_id){
html += '[수정]';
html += '[삭제]';
}
html += '
';
html += '
';
html += '
';
html += com_contents;
html += '
';
html += '
';
html += '';
html += '';
html += '
';
html += '';
} else {
html += '
';
html += '삭제된 댓글입니다.';
html += '
';
}
}
$("#reply_list").html(html);
} else {
var not_login_html = "댓글 기능은 로그인 하셔야 사용하실 수 있습니다";
$("#outline").html(not_login_html);
}
}
});
} else {
$(".reply_container").hide();
}
}
//댓글 등록
function insertComment(){
//console.log("댓글 등록 테스트");
var urlParams = new URL(location.href).searchParams;
var publishId = urlParams.get('publishId');
//console.log("퍼블리시 아이디 : " + publishId);
var url = "/news/comment/insertComment.do";
var com_contents = $("#com_contents").val();
if(com_contents === "" || com_contents === undefined){
alert("빈 댓글은 등록할 수 없습니다");
return;
}
var data ={
"com_bno": publishId,
"com_contents": com_contents
};
$.ajax({
url: url,
type: 'POST',
data: data,
success: function(data){
if (data.result === "로그인 하지 않은 사용자"){
alert("로그인을 하셔야 작성하실 수 있습니다");
location.href="/com/cmm/login_page.do?beforeUrl="+location.href;
} else if (data.result == "등록 실패"){
alter("등록이 실패되었습니다");
} else {
selectCommentList(publishId);
$("#com_contents").val("");
}
}
});
}
//수정 클릭 시
function activeUpdate(index){
$("#text-unit-"+index).hide();
var update_contents = $("#text-unit-"+index).text();
$("#update-input-"+index).val(update_contents);
$("#update-container-"+index).css("display", "flex");
}
//삭제 클릭 시
function deleteComment(com_no, index){
var com_no = com_no;
var url = "/news/comment/deletecomment.do";
var data = {
"com_no": com_no
}
$.ajax({
url: url,
data: data,
type: 'POST',
success: function(data){
//console.log(data);
if (data.result === 0){
alert("삭제가 실패했습니다.");
} else if (data.result === 1){
selectCommentList(publishId);
} else if (data.result === 2){
alert("로그인 하지 않은 사용자입니다");
} else {
alert("작성자만 삭제할 수 있습니다");
}
}
});
}
//수정 취소 버튼 클릭 시
function inactiveUpdate(index){
$("#text-unit-"+index).show();
$("#update-container-"+index).css("display", "none");
}
//댓글 수정 버튼 클릭 시
function updateComment(com_no, index){
var com_no = com_no;
var url = "/news/comment/updatecomment.do";
var com_contents = $("#update-input-" + index).val();
if(com_contents === "" || com_contents === undefined){
alert("빈 댓글은 등록할 수 없습니다");
return;
}
var data = {
"com_no": com_no,
"com_contents": $("#update-input-" + index).val(),
}
$.ajax({
url: url,
data: data,
type: 'POST',
success: function(data){
//console.log(data);
if (data.result === 0){
alert("수정이 실패했습니다.");
} else if (data.result === 1){
selectCommentList(publishId);
} else if (data.result === 2){
alert("로그인 하지 않은 사용자입니다");
} else {
alert("작성자만 수정할 수 있습니다");
}
}
});
}
엑소 첸백시, 日 오리콘차트 2위 진입
2017-05-2516:52연예
첸백시, 사진=SM엔터테인먼트
그룹 엑소의 유닛 엑소-첸백시가 일본 데뷔음반으로 오리콘차트 2위에 올랐다.
25일 일본 최대 음반 집계사이트 오리콘 스타일에 따르면 지난 24일 발매된 엑소 첸백시의 일본 데뷔음반 'GIRLS'는 첫 날 2만 6541장의 판매고를 기록하며 일간차트 2위에 진입했다.
첸백시는 지난해 10월 국내 데뷔한 엑소의 첫 번째 유닛이다. 일본 정식 데뷔에 앞서 이달 초 도쿄 시부야 등에서 데뷔 공연을 가졌다.
데뷔를 앞두고 일본 매체 닛칸스포츠와 진행된 인터뷰에서 "마음이 정말 잘 맞고, 서로를 잘 알고 있다. 추구하는 음악의 방향성도 비슷하다"고 밝혔다. 일본에서 어떤 활동을 하고 싶냐는 질문에는 "여러 지역의 팬분들과 팬미팅으로 만나는 것이 올해의 목표"라고 밝힌 바 있다.
채널A의 각종 서비스를 사용하여 인터넷에 올려진 정보를 얻고자 하실 때에는 다음과 같은 점에 유의하시기 바랍니다.
채널A가 제공하는 모든 제반 서비스를 이용하여 연결(링크)된 사이트에 수록되어 있는 정보 중에는 회원의 개인적인 판단에 따라 불쾌감 또는 피해를 주는 내용이 있을 수도 있습니다.
채널A의 각 사이트 및 동호회 서비스 등에서 채널A 사이트 외부로의 링크 결과 열람하시는 사이트에서 현행 국내법상 불법이거나, 사회의 일반통념, 질서 및 미풍양속 등에 어긋나는 내용을 사전에 차단 하는 것과 관련하여 채널A는 어떠한 책임도 지지 않습니다.
채널A는 네트워크에 링크된 모든 사이트에 수록된 자료의 정확성이나 상표법, 저작권법 등의 관계 법령의 준수 여부에 대하여 어떤 책임도 부인합니다.
회원님들께서는 채널A와 네트워크로 연결되어 있는 웹사이트 또는 제3자에 의하여 채널A네트워크 상에서 작동되거나 제공되는 모든 정보, 상품들은 채널A의 통제 권한 밖에서 제작, 게시 및 작동되었음을 유념하시기 바랍니다.
회원들이 복제 인용 등의 방법으로 채널A 사이트 안에 다른 사이트의 콘텐츠를 제공하였을 경우, 콘텐츠의 내용은 제3자에 의하여 개발되었고 회원에 의해 게시되었므로 채널A의 책임 여부와는 무관함을 명심하시기 바랍니다.
물론 채널A가 스스로 제공하는 콘텐츠에 관하여는 위에 열거된 법령과 혹시 누락된 법령일지라도 관련 법령을 준수하기 위하여 최선을 다하고 있습니다.
채널A의 서비스에 관하여 일반적 혹은 관계 법령의 준수에 관한 조언을 하고자 하실 때에는 언제나 홈페이지에 게시된 담당자에게 연락주시기 바랍니다.