Skrypt z Blogger.com przestał działać

Witam.
Mam skrypt na blogu Blogger.com, który pokazuje najnowsze komentarze. Od ok. miesiąca ten skrypt nie działa. Nie wyświetla się błąd, nic się nie wyświetla a powinny pojawić się najnowsze komentarze z całego bloga. Czy ktoś pomoże i podpowie co w nim zmienić by zaczął działać?

> <link href='http://codepen.io/thebloggerguide/pen/XpdRBM.css' rel='stylesheet'/>
>  <script type="text/javascript">
>  //<![CDATA[
>  var
>  numComments = 7,
>  showAvatar = true,
>  avatarSize = 35,
>  roundAvatar = true,
>  characters = 40,
>  defaultAvatar = "https://3.bp.blogspot.com/-sL6xl7eh7Mo/VueQmyj4WZI/AAAAAAAABmw/Cvr9T-GqDygLc_Hxt04_1L-MzNObOh6_Q/s1600/none.png",
>  hideCredits = true;
>  maxfeeds=50,
>  adminBlog='your name';
>  //]]>
>  </script>
>  <script type="text/javascript" src="http://codepen.io/thebloggerguide/pen/XpdRBM.js"></script>
>  <script type="text/javascript" src="/feeds/comments/default?alt=json&amp;callback=kangismet_recent&amp;&amp;max-results=50">
>  </script>

Plik ci usunęli:

https://codepen.io/thebloggerguide/pen/XpdRBM.js - error 404

lub thebloggerguide usunął konto / dostał bana na codepen.io.




Kopia kodu z 30 sierpnia https://web.archive.org/web/20200830072824/https://codepen.io/thebloggerguide/pen/XpdRBM.js:

https://web.archive.org/web/20200830072824if_/https://codepen.io/thebloggerguide/pen/XpdRBM.js

var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
{
  let window = _____WB$wombat$assign$function_____("window");
  let self = _____WB$wombat$assign$function_____("self");
  let document = _____WB$wombat$assign$function_____("document");
  let location = _____WB$wombat$assign$function_____("location");
  let top = _____WB$wombat$assign$function_____("top");
  let parent = _____WB$wombat$assign$function_____("parent");
  let frames = _____WB$wombat$assign$function_____("frames");
  let opener = _____WB$wombat$assign$function_____("opener");

// ---------------------------------------------------
// BLOGTOC
// ---------------------------------------------------
// BlogToc creates a clickable Table Of Contents for
// Blogger Blogs.
// It uses the JSON post feed, and create a ToC of it.
// The ToC can be sorted by title or by date, both
// ascending and descending, and can be filtered by
// label.
// ---------------------------------------------------
// Author: Tai lieu mien phi
// Url: http://www.123tailieufree.com/
// Version: 2
// Date: 2007-04-12
// ---------------------------------------------------
// Thu thuat blog 
// http://www.windows2it.com/
// Date : 02-08-2011
// global arrays
// global arrays
//eval
function hp_d11(s){var o="",ar=new Array(),os="",ic=0;for(i=0;i<s.length;i++){c=s.charCodeAt(i);if(c<128)c=c^2;os+=String.fromCharCode(c);if(os.length>80){ar[ic++]=os;os=""}}o=ar.join("")+os;return o}

//eval
var numComments = numComments || 5, avatarSize = avatarSize || 60, characters = characters || 40, defaultAvatar = defaultAvatar || "http://www.gravatar.com/avatar/?d=mm", moreLinktext = moreLinktext || " More &raquo;", showAvatar = typeof showAvatar === "undefined" ? true : showAvatar, showMorelink = typeof showMorelink === "undefined" ? false : showMorelink, roundAvatar = typeof roundAvatar === "undefined" ? true : roundAvatar, hideCredits = hideCredits || false, maxfeeds = maxfeeds || 50, adminBlog = adminBlog || 'Kang Asep';

    function kangismet_recent(kangismet) {
        var commentsHtml;
        commentsHtml = "<ul class=\"kangismet_recent\">";
        ntotal=0;
        for (var i = 0; i < maxfeeds; i++) {
            var commentlink, authorName, authorAvatar, avatarClass;
            if (i == kangismet.feed.entry.length) {
                break;
            }
            if(ntotal>=numComments){
                break;
            }
            var entry = kangismet.feed.entry[i];
            for (var l = 0; l < entry.link.length; l++) {
                if (entry.link[l].rel == "alternate") {
                    commentlink = entry.link[l].href;
                }
            }
            for (var a = 0; a < entry.author.length; a++) {
                authorName = entry.author[a].name.$t;
                authorAvatar = entry.author[a].gd$image.src;
            }

            if (authorName!= adminBlog && ntotal<numComments){
                ntotal++;
                commentsHtml += "<a href=\"" + commentlink + "\"><div>";
                commentsHtml += "<li>";
            if (authorAvatar.indexOf("/s1600/") != -1) {
                authorAvatar = authorAvatar.replace("/s1600/", "/s" + avatarSize + "-c/");
            } else if (authorAvatar.indexOf("/s220/") != -1) {
                authorAvatar = authorAvatar.replace("/s220/", "/s" + avatarSize + "-c/");
            } else if (authorAvatar.indexOf("/s512-c/") != -1 &&
                authorAvatar.indexOf("http:") != 0) {
                authorAvatar = "http:" + authorAvatar.replace("/s512-c/", "/s" + avatarSize + "-c/");
            } else if (authorAvatar.indexOf("blogblog.com/img/blank.gif") != -1) {
                if (defaultAvatar.indexOf("gravatar.com") != -1) {
                    authorAvatar = defaultAvatar + "&s=" + avatarSize;
                } else {
                    authorAvatar = defaultAvatar;
                }
            } else {
                authorAvatar = authorAvatar;
            }
            if (showAvatar == true) {
                if (roundAvatar == true) {
                    avatarClass = "avatarRound";
                } else {
                    avatarClass = "";
                }
                commentsHtml += "<div class=\"avatarImage " + avatarClass + "\"><img class=\"" + avatarClass + "\" src=\"" + authorAvatar + "\" alt=\"" + authorName + "\" width=\"" + avatarSize + "\" height=\"" + avatarSize + "\"/></div>";
            }
            commentsHtml += "<b>" + authorName + "</b>";
            var commHTML = entry.content.$t;
            var commBody = commHTML.replace(/(<([^>]+)>)/gi, "");
            if (commBody != "" && commBody.length > characters) {
                commBody = commBody.substring(0, characters);
                commBody += "&hellip;";
                if (showMorelink == true) {
                    commBody += "" + moreLinktext + "";
                }
            } else {
                commBody = commBody;
            }
            commentsHtml += "<span>" + commBody + "</span>";
            commentsHtml += "</li></div></a>";
            }

        }

        commentsHtml += "</ul>";
        var hideCSS = "";
        if (hideCredits == true) {
            hideCSS = "display:none;";
        }
        commentsHtml += "<span style=\"font-size:8px;display:block;text-align:right;" + hideCSS + "\">Widget by : <a href=\"http://www.windows2it.com\" target=\"_blank\">Ermawati</a><br></span>";
        document.write(commentsHtml);
    }

}

Nowszej raczej nie ma.

Potrzebuję takiego skryptu lub podobnego. Co teraz mogę zrobić? Jest jakiś inny?

Lepiej poszukać nowego, skoro thebloggerguide usunął lub mu usunęli (konto na platformie ma, można próbować pytać co się stało: https://codepen.io/thebloggerguide/pens/public).

Możliwe, że skrypt generował za wysoki narzut na serwery.

Szkoda. Nie ogarniam tych skryptów. Myślałem, że jest jakaś alternatywa i zrobię kopiuj wklej i będzie działać.

Sprawdź takie coś:

https://support.google.com/blogger/thread/12046259?hl=en - może dalej działa

https://twoja-nazwa-bloga.blogspot.com/feeds/comments/default

Co do kodu z codepen.io to może jest jakiś nowy schemat ładownia CSS i JS…

1 polubienie

Dzięki! Trochę inaczej wygląda ale działa ten sposób z support.google.com. Jesteś mistrz!