2021년 12월 20일 월요일 (음력: 11월 17일) [스포츠동아 오늘의 운세] : 네이버 뉴스




■ 오늘의 운세|박경호의 운수 좋은 날

도원역리학회 도원학당 원장

[스포츠동아]

기자 프로필

var recommendLayerHtml = Persist.getPersistedData("recommendLayerHtml"); if (recommendLayerHtml) { $('.journalistcard_recommend').html(recommendLayerHtml); }

var recommendLayerOpen = Persist.getPersistedData("recommendLayerOpen"); if (recommendLayerOpen) { this._openRecommendJournalistLayer(); }

Persist.addOnClickLinkListener(function(persist) { persist.set("journalistCardMoreOpen", journalistCardFunction.isJournalistCardMoreOpen()); persist.set("recommendLayerOpen", journalistCardFunction.isRecommendLayerOpen()); persist.set("recommendLayerHtml", $('.journalistcard_recommend').html()); }); }, toggleMoreJournalistCard : function () { var targetLayers = $('._more_journalistcard'); var isOpenMoreJournalistCard = targetLayers.css('display') !== 'none';

this._openCloseMoreJournalistCard(!isOpenMoreJournalistCard); }, _openCloseMoreJournalistCard : function(isOpenMoreJournalistCard) { var newDisplayValue = isOpenMoreJournalistCard ? '':'none'; var targetLayers = $('._more_journalistcard'); targetLayers.css('display',newDisplayValue);

$('.article_journalist_button') .removeClass(isOpenMoreJournalistCard ? 'is_unfold' : 'is_fold') .addClass(isOpenMoreJournalistCard? 'is_fold' : 'is_unfold'); }, subscribeJournalistChannel : function(event) { var subscribeWrapper = $(event.currentTarget).closest('.subscribe_wrap'); var channelKey = subscribeWrapper.attr('data-channelKey'); if (!channelKey) { return; }

var subscribeButton = subscribeWrapper.find('button.subscribe'); var eventTarget = $(event.currentTarget);

if (!eventTarget.hasClass('on')) { var subscribeNclkCode = eventTarget.attr('data-subscribe-nclick'); if (subscribeNclkCode) { nclk(event, subscribeNclkCode, '', ''); }

$.ajax({ url: '/main/ajax/channel/subscribe.naver', data: { channelKey : channelKey }, context: this, success : function(res) { if (res.result === true) {

subscribeButton.addClass('on'); subscribeButton.text('구독중');

this._openRecommendJournalistLayer(); this._updateFeedCount(subscribeWrapper, res.count); } else if (res.code === 401) {

var redirectionUrl = "https://nid.naver.com/nidlogin.login?mode=form&url=" + encodeURIComponent(window.location.toString()); window.location.href = redirectionUrl; } } }); } else { subscribeWrapper.find('.subscribe_layer').css('display', ''); var unsubscribeNclkCode = eventTarget.attr('data-unsubscribe-nclick'); if (unsubscribeNclkCode) { nclk(event, unsubscribeNclkCode, '', ''); } } }, unsubscribeJournalistChannel : function (event) {

var subscribeWrapper = $(event.currentTarget).closest('.subscribe_wrap'); var channelKey = subscribeWrapper.attr('data-channelKey'); if (!channelKey) { return; } var subscribeButton = subscribeWrapper.find('._subscribe_btn'); var response = event.currentTarget.getAttribute('data-unsubscribe-response');

if (response === 'yes') { $.ajax({ url: '/main/ajax/channel/unsubscribe.naver', data: { channelKey : channelKey }, context: this, success : function(res) { if (res.result === true) { subscribeButton.removeClass('on'); subscribeButton.text('구독'); this._updateFeedCount(subscribeWrapper, res.count); } } }); } subscribeWrapper.find('.subscribe_layer').css('display','none');

}, _openRecommendJournalistLayer : function () {

if (!$('.journalistcard_recommend').html()) { $.ajax({ url: this._RECOMMEND_JOURNALIST_API, data: { officeId: '382', articleId: '0000951897', count: 5 }, context: this, success : function (res) { if (res && res.message && res.message.success === true) { var journalistData = { recommendJournalists : res.message.result }; var isAvailableRecommendJournalist = journalistData.recommendJournalists.filter(function(item) { return item.feedCount > 0; }).length >= 3;

if (isAvailableRecommendJournalist) { journalistData.recommendJournalists.forEach(function (item) { item.feedCount = item.feedCount.toLocaleString('ko-KR'); });

var recommendJournalistLayer = this._RECOMMEND_TEMPLATE.process(journalistData); $(".journalistcard_recommend").html(recommendJournalistLayer); this._showRecommendJournalistLayer(); } } } }); } else {

this._showRecommendJournalistLayer(); } }, _showRecommendJournalistLayer : function () { $('.journalistcard_recommend').addClass('is_on'); }, _closeRecommendJournalistLayer : function () { $('.journalistcard_recommend').removeClass("is_on"); }, isJournalistCardMoreOpen: function() { return $('._more_journalistcard').css('display') !== 'none'; }, isRecommendLayerOpen: function() { return $('.journalistcard_recommend').hasClass('is_on'); }, _updateFeedCount : function (currentTarget, count) { var rootRecommendItem = currentTarget.closest('.journalistcard_recommend_item_inner'); var isRecommendItem = rootRecommendItem.length > 0;

var feedCountLabel; if (isRecommendItem) {

feedCountLabel = rootRecommendItem.find('._journalistcard_feed_count'); } else {

var rootItem = currentTarget.closest('.journalistcard_summary_top'); feedCountLabel = rootItem.find('._journalistcard_feed_count');

var subscribeFeedLayer = rootItem.find('._feed_summary_subscribe_inner'); if (count === 0) { subscribeFeedLayer.hide(); } else { subscribeFeedLayer.show(); } } feedCountLabel.text(count.toLocaleString('ko-KR')); }, updateCheerComponent : function (params) { var existsCheerJournalistList = params.contents.filter(function(content) { if (content.serviceId !== 'JOURNALIST') { return false; } return content.reactions.filter(function(r) { return r.reactionType === 'cheer' && r.count >= 1; }).length > 0; }).map(function(data) { var journalistId = data.contentsId; return journalistId; });

$(".journalistcard_item").each(function (i, el) { var jel = $(el);

var cheerComponent = jel.find(".u_likeit_list_module"); var journalistId = cheerComponent.attr("data-cid"); if ($.inArray(journalistId, existsCheerJournalistList) < 0) { cheerComponent.closest("._cheer_summary_subscribe_inner").hide(); } }); } }; journalistCardFunction.init();

이 기사는 언론사에서 생활 섹션으로 분류했습니다.






생활/문화 속보

기사목록 전체보기



언론사별 가장 많이 본 뉴스

오후 7시~오후 8시까지 집계한 결과입니다.

언론사별 가장 많이 본 뉴스

오후 7시~오후 8시까지 집계한 결과입니다.

욕설 댓글 리마인드 팝업

상처 없는 댓글 세상 만들기에 많은 참여 부탁드립니다.

확인




Add a Comment

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다