迪士尼著色

2012062222:15














作者介紹
前往 enjw 的 styleMe 個人頁
styleMe 文章人數:487 人氣:
簡介:最愛的天氣~ 天空晴藍~ 最愛東寫西寫~記錄一切~
    ', authorBadgesHtml = $('
      '), // 徽章列表 authorBadgesArr = [{ index: 'is_celebrity', image: 'https://styleme.pixnet.net/assets/images/icon-badge-fashion.png', alt: 'styleMe 風尚名人' }, { index: 'is_focus', image: 'https://styleme.pixnet.net/assets/images/icon-badge-cover.png', alt: 'styleMe 封面之星' }]; articleAmount.text(stylemeData.article_count); for (var i = 0; i < authorBadgesArr.length; i++) { if ('1' === stylemeData[authorBadgesArr[i].index]) { var thisBadge = $(badgeTemplate); thisBadge.find('img').attr('src', authorBadgesArr[i].image).attr(''); thisBadge.appendTo(authorBadgesHtml); } } authorBadges.append(authorBadgesHtml.html()); stylemeProfileCard.show(); addStylemeProfileGa(); }, stylemeProfilePushEvent = function (action, label) { ga('stylemeProfileCardTracker.send', { 'hitType': 'event', 'eventCategory': 'styleme in blog', 'eventAction': action, 'eventLabel': label }); }, addStylemeProfileGa = function () { var thisDevice = 'PC', stylemeProfileCard = $('.profile-card'); (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-408650-10', 'auto', 'stylemeProfileCardTracker'); // 記錄曝光 stylemeProfilePushEvent('imps', thisDevice + '_author_image'); stylemeProfilePushEvent('imps', thisDevice + '_author_name'); // 記錄點擊 stylemeProfileCard.on('click', function (evt) { var thisClass = evt.target.getAttribute('class'); if (thisClass.indexOf('author__avatar') + 1) { stylemeProfilePushEvent('click', thisDevice + '_author_image'); } else if (thisClass.indexOf('author__name-link') + 1) { stylemeProfilePushEvent('click', thisDevice + '_author_name'); } }); }, // styleMe API 需要的變數 stylemeData = (function () { var urlWithoutTitle = window.location.href.split('?')[0].split('-')[0], urlWordArray = urlWithoutTitle.match(/(\w+)/g); return { username: urlWordArray[1], articleId: urlWordArray[urlWordArray.length - 1] }; })(); $.ajax({ url: 'http://emma.pixnet.cc/blog/articles/' + stylemeData.articleId + '/stylemebadge', type: 'get', dataType: 'json', data: { user: stylemeData.username, format: 'json' } }).done(function(response) { if (response.badge) { addStlyemeData(response.badge); } else { $('.profile-card').remove(); } }); })(jQuery);


    我要留言
    哆啦A夢--著色
    姓名貼