-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcomment3.js
1 lines (1 loc) · 5.34 KB
/
comment3.js
1
function blockLinks(e,t){for(var a=document.getElementById(e),l=a.getElementsByTagName(t),i=0;i<l.length;i++)-1!==l[i].innerHTML.indexOf("</a>")&&(l[i].innerHTML="Maaf <span style='background-color: red; color: white; padding: 3px;'><b>link hidup</b></span> tidak akan tampil di sini!",l[i].className="spammer-detected")}function showhide(){var e=document.getElementById("share-menu");"block"!==e.style.display?e.style.display="block":e.style.display="none"}function resizeThumb(e,t){for(var a=document.getElementById(e),l=a.getElementsByTagName("img"),i=0;i<l.length;i++)l[i].src=l[i].src.replace(/\/s72\-c/,"/s"+t),l[i].width=t,l[i].height=t}var items=document.getElementById("items-thumbnail"),divs=document.getElementsByClassName("thumb-post");[].slice.call(divs).forEach(function(e){e.innerHTML=items.innerHTML}),$(document).ready(function(){var e=$("a.blog-pager-older-link").attr("href");$("a.blog-pager-older-link").load(e+" .post-title:first",function(){var e=$("a.blog-pager-older-link").text();$("a.blog-pager-older-link").text(e)});var t=$("a.blog-pager-newer-link").attr("href");$("a.blog-pager-newer-link").load(t+" .post-title:first",function(){var e=$("a.blog-pager-newer-link:first").text();$("a.blog-pager-newer-link").text(e)})}),blockLinks("comment_block","p");var randomRelatedIndex,showRelatedPost;!function(e,t,a){var l={widgetTitle:"<h4>Artikel Terkait:</h4>",widgetStyle:1,homePage:"https://mastamvan.blogspot.com/",numPosts:7,summaryLength:370,titleLength:"auto",thumbnailSize:72,noImage:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAA3NCSVQICAjb4U/gAAAADElEQVQImWOor68HAAL+AX7vOF2TAAAAAElFTkSuQmCC",containerId:"related-post",newTabLink:!1,moreText:"Baca Selengkapnya",callBack:function(){}};for(var i in relatedPostConfig)l[i]="undefined"==relatedPostConfig[i]?l[i]:relatedPostConfig[i];var n=function(e){var l=t.createElement("script");l.type="text/javascript",l.src=e,a.appendChild(l)},s=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},r=function(e){var t,a,l=e.length;if(0===l)return!1;for(;--l;)t=Math.floor(Math.random()*(l+1)),a=e[l],e[l]=e[t],e[t]=a;return e},o="object"==typeof labelArray&&labelArray.length>0?"/-/"+r(labelArray)[0]:"",m=function(e){var t=e.feed.openSearch$totalResults.$t-l.numPosts,a=s(1,t>0?t:1);n(l.homePage.replace(/\/$/,"")+"/feeds/posts/summary"+o+"?alt=json-in-script&orderby=updated&start-index="+a+"&max-results="+l.numPosts+"&callback=showRelatedPost")},d=function(e){var t,a,i,n,s,o=document.getElementById(l.containerId),m=r(e.feed.entry),d=l.widgetStyle,c=l.widgetTitle+'<ul class="related-post-style-'+d+'">',p=l.newTabLink?' target="_blank"':"",h='<span style="display:block;clear:both;"></span>';if(o){for(var u=0;u<l.numPosts&&u!=m.length;u++){a=m[u].title.$t,i="auto"!==l.titleLength&&l.titleLength<a.length?a.substring(0,l.titleLength)+"…":a,n="media$thumbnail"in m[u]&&l.thumbnailSize!==!1?m[u].media$thumbnail.url.replace(/\/s[0-9]+(\-c)?/,"/s"+l.thumbnailSize):l.noImage,s="summary"in m[u]&&l.summaryLength>0?m[u].summary.$t.replace(/<br ?\/?>/g," ").replace(/<.*?>/g,"").replace(/[<>]/g,"").substring(0,l.summaryLength)+"…":"";for(var g=0,b=m[u].link.length;b>g;g++)t="alternate"==m[u].link[g].rel?m[u].link[g].href:"#";c+=2==d?'<li><img title="'+a+'" alt="'+a+'" class="related-post-item-thumbnail lazy" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="'+n+'" width="'+l.thumbnailSize+'" height="'+l.thumbnailSize+'"><a class="related-post-item-title" title="'+a+'" href="'+t+'"'+p+">"+i+'</a><span class="related-post-item-summary"><span class="related-post-item-summary-text">'+s+'</span> <a href="'+t+'" class="related-post-item-more"'+p+">"+l.moreText+"</a></span>"+h+"</li>":3==d||4==d?'<li class="related-post-item" tabindex="0"><a class="related-post-item-title" href="'+t+'"'+p+'><img title="'+a+'" alt="'+a+'" class="related-post-item-thumbnail lazy" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="'+n+'" width="'+l.thumbnailSize+'" height="'+l.thumbnailSize+'"></a><div class="related-post-item-tooltip"><a class="related-post-item-title" title="'+a+'" href="'+t+'"'+p+">"+i+"</a></div>"+h+"</li>":5==d?'<li class="related-post-item" tabindex="0"><a class="related-post-item-wrapper" href="'+t+'" title="'+a+'"'+p+'><img title="'+a+'" alt="'+a+'" class="related-post-item-thumbnail lazy" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="'+n+'" width="'+l.thumbnailSize+'" height="'+l.thumbnailSize+'"><span class="related-post-item-tooltip">'+i+"</span></a>"+h+"</li>":6==d?'<li><a class="related-post-item-title" title="'+a+'" href="'+t+'"'+p+">"+i+'</a><div class="related-post-item-tooltip"><img alt="" class="related-post-item-thumbnail lazy" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="'+n+'" width="'+l.thumbnailSize+'" height="'+l.thumbnailSize+'"><span class="related-post-item-summary"><span class="related-post-item-summary-text">'+s+"</span></span>"+h+"</div></li>":'<li><a title="'+a+'" href="'+t+'"'+p+">"+i+"</a></li>"}o.innerHTML=c+="</ul>"+h,l.callBack()}};randomRelatedIndex=m,showRelatedPost=d,n(l.homePage.replace(/\/$/,"")+"/feeds/posts/summary"+o+"?alt=json-in-script&orderby=updated&max-results=0&callback=randomRelatedIndex")}(window,document,document.getElementsByTagName("head")[0]),resizeThumb("PopularPosts1",100);