-1

The problem is that after receiving the SSL certificate, and switch my site from http to https some functions of my site (on my own domain) on the blogger platform, stopped working.

How can I fix the code to make them work again?

<script type="text/javascript">
function LoadTheArchive(TotalFeed) 
{
    var PostTitles = new Array();
    var PostURLs = new Array();
    var PostYears = new Array();
    var PostMonths = new Array();
    var PostDays = new Array();

    if("entry" in TotalFeed.feed) 
    {
        var PostEntries=TotalFeed.feed.entry.length;
        for(var PostNum=0; PostNum<PostEntries ; PostNum++) 
        {
            var ThisPost = TotalFeed.feed.entry[PostNum];
            PostTitles.push(ThisPost.title.$t);
            PostYears.push(ThisPost.published.$t.substring(0,4));
            PostMonths.push(ThisPost.published.$t.substring(5,7));
            PostDays.push(ThisPost.published.$t.substring(8,10));
            var ThisPostURL;
            for(var LinkNum=0; LinkNum < ThisPost.link.length; LinkNum++) 
            {
                if(ThisPost.link[LinkNum].rel == "alternate") 
                {
                    ThisPostURL = ThisPost.link[LinkNum].href;
                    break
                }
            }
            PostURLs.push(ThisPostURL);
        }
    }
    DisplaytheTOC(PostTitles,PostURLs,PostYears,PostMonths,PostDays);
}

function DisplaytheTOC(PostTitles,PostURLs,PostYears,PostMonths,PostDays)
{
    var MonthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];
    var NumberOfEntries=PostTitles.length;
    var currentMonth = "";
    var currentYear = "";

    for(var EntryNum = 0; EntryNum < NumberOfEntries; EntryNum++)
    {
        NameOfMonth = MonthNames[parseInt(PostMonths[EntryNum],10)-1]

        if (currentMonth != NameOfMonth || currentYear != PostYears[EntryNum]) 
        {
            currentMonth = NameOfMonth;
            currentYear = PostYears[EntryNum];

            document.write("<div class='dateStyle'><br />" + currentMonth+" "+currentYear+" </div>");
        }

        document.write('<a href ="'+PostURLs[EntryNum]+'"><div class=dayStyle>'+parseInt(PostDays[EntryNum],10)+":&nbsp;&nbsp;</div> "+PostTitles[EntryNum]+"</a><br />");
    }
}
</script>

<script src="https://mywebsite.com/feeds/posts/default?max-results=500&amp;alt=json-in-script&amp;callback=LoadTheArchive" />
</script>
<script src="https://mywebsite.com/feeds/posts/default?max-results=150&start-index=151&alt=json-in-script&callback=LoadTheArchive"></script>
<script src="https://mywebsite.com/feeds/posts/default?max-results=150&start-index=301&alt=json-in-script&callback=LoadTheArchive"></script>
<script src="https://mywebsite.com/feeds/posts/default?max-results=150&start-index=451&alt=json-in-script&callback=LoadTheArchive"></script>
<script src="https://mywebsite.com/feeds/posts/default?max-results=150&start-index=601&alt=json-in-script&callback=LoadTheArchive"></script>
<script src="https://mywebsite.com/feeds/posts/default?max-results=150&start-index=851&alt=json-in-script&callback=LoadTheArchive"></script>
<script src="https://mywebsite.com/feeds/posts/default?max-results=150&start-index=1001&alt=json-in-script&callback=LoadTheArchive"></script>

<!--CUSTOMIZATION-->
<style type="text/css">
.dateStyle {
     color:#000;
     font-size: 30px;
     font-family: Fjalla One;
     margin: 0;
}

.dayStyle {
     color:#000;
     font-family: Droid Sans;
     display: inline-block;
}

</style>

And now the form says that it looks like my post is mostly code, a I need to add some more details, but I don't know what to add more, because all what I needed, I was asked above.

Martin Evans
  • 45,791
  • 17
  • 81
  • 97
  • 1
    Can you post the exact error you are receiving? Is any file still loaded over plain http? It is possible the browser refuses to load some files due to mixing http and https. – ext Nov 18 '17 at 13:54
  • I haven't received any error, cuz it' blogger platform. I just don't see the result of this code. – Lays White Nov 18 '17 at 14:02
  • You can also check developer tools (F12) in most browsers, check in "Console" and "Network" for any errors. – ext Nov 18 '17 at 14:05
  • 1
    Give us a link to your site – Coffee bean Nov 18 '17 at 14:07
  • @ext, Uncaught SyntaxError: missing ) after argument list www.googletagmanager.com/gtm.js?id=GTM-KMHDS79 Failed to load resource: the server responded with a status of 404 () default Failed to load resource: net::ERR_CONNECTION_CLOSED default Failed to load resource: net::ERR_CONNECTION_CLOSED default Failed to load resource: net::ERR_CONNECTION_CLOSED default Failed to load resource: net::ERR_CONNECTION_CLOSED default Failed to load resource: net::ERR_CONNECTION_CLOSED default Failed to load resource: net::ERR_CONNECTION_CLOSED – Lays White Nov 18 '17 at 14:11
  • default Failed to load resource: net::ERR_CONNECTION_CLOSED almanac.html:1842 Uncaught TypeError: jQuery.ias is not a function at HTMLDocument. (domain.html:1842) at j (jquery.min.js:2) at Object.fireWith [as resolveWith] (jquery.min.js:2) at Function.ready (jquery.min.js:2) at HTMLDocument.J (jquery.min.js:2) – Lays White Nov 18 '17 at 14:11
  • @coffee-bean, sorry I can't :( – Lays White Nov 18 '17 at 14:12
  • Bassam was right – Lays White Nov 18 '17 at 14:20

1 Answers1

0

What about changing script tags to the following

<script src="/feeds/posts/default?max-results=500&amp;alt=json-in-script&amp;callback=LoadTheArchive"/>
<script src="/feeds/posts/default?max-results=150&start-index=151&alt=json-in-script&callback=LoadTheArchive"/>
<script src="/feeds/posts/default?max-results=150&start-index=301&alt=json-in-script&callback=LoadTheArchive"/>
<script src="/feeds/posts/default?max-results=150&start-index=451&alt=json-in-script&callback=LoadTheArchive"/>
<script src="/feeds/posts/default?max-results=150&start-index=601&alt=json-in-script&callback=LoadTheArchive"/>
<script src="/feeds/posts/default?max-results=150&start-index=851&alt=json-in-script&callback=LoadTheArchive"/>
<script src="/feeds/posts/default?max-results=150&start-index=1001&alt=json-in-script&callback=LoadTheArchive"/>
  • @Coffeebean, It is valid with XML. By default, blogger editor closes any empty tags that way and when retrieving data, blogger xml parser converts xml code to a valid html to displaying on the browsers. –  Nov 18 '17 at 19:40