티스토리 수익 글 보기

티스토리 수익 글 보기

(function () { // 신규로 구독을 시작한 블로그 목록. var addedFollowBlogList = []; var TistoryProfile = { init : function(info, elem) { this.profileInfo = eval(info); this.isItem = this.profileInfo.items && this.profileInfo.items.length > 0 ? true : false; if (!this.profileWrap) { this.fragment = document.createDocumentFragment(); var pw = this.profileWrap = document.createElement(‘div’); var wt = document.createElement(‘div’); var wm = this.profileContent = document.createElement(‘div’); var wmbw = document.createElement(‘div’); var wmiw = this.itemWrap = document.createElement(‘ul’); var wb = this.profileMine = document.createElement(‘div’); pw.id = ’tistoryProfileLayer’; wt.className = ‘wrapTop’; wm.className = ‘wrapMiddle’; wmbw.className = ‘profileButtonWrap’; wmiw.className = ‘itemWrap’; wmbw.innerHTML = ‘<\/span><\/span><\/a>‘; wb.className = this.isItem ? ‘wrapBottomM’ : ‘wrapBottom’; wm.appendChild(wmbw); wm.appendChild(wmiw); pw.appendChild(wt); pw.appendChild(wm); pw.appendChild(wb); this.fragment.appendChild(pw); this.myProfile(‘add’); document.body.appendChild(this.fragment); } else { this.profileMine.className = this.isItem ? ‘wrapBottomM’ : ‘wrapBottom’; this.myProfile(); } }, escapeHTML : function(s){ return s.replace(/&/g,’&’).replace(//g,’>’).replace(/”/g,’"’) .replace(/’/g,’'’); }, getCoords : function(e, elem) { var coords = { “left” : 0, “top” : 0, “right” : 0, “bottom” : 0 }, w = elem.offsetWidth, h = elem.offsetHeight; if (e.pageX || e.pageY) { coords.left = e.pageX; coords.top = e.pageY; } else if (e.clientX || e.clientY) { coords.left = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; coords.top = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; } coords.right = coords.left + w; coords.bottom = coords.top + h; return coords; }, htmlTitle : function(profileInfo) { var blogId = parseInt(profileInfo.blogId); var html = ” + ‘‘ + ‘‘ + this.escapeHTML(profileInfo.title) + ‘<\/a>‘ + ‘<\/span>‘; if (profileInfo.isSubscriber === false && addedFollowBlogList.indexOf(blogId) < 0) { html = html + '