function updateReleaseNotes(data, current_tag){
    const latest = data[0];
    let tag = document.getElementById("tag");
    let container = document.getElementById("update_status");
    container.style.display = "block";
    tag.innerHTML = "Most Recent Version Available: " + latest["tag_name"];

    let text = document.getElementById("text");
    if(current_tag === latest["tag_name"]){
        text.innerHTML = "<i>Submitty is up to date!</i>";
    }else{
        text.innerHTML = "<a href = \""+ latest["html_url"] + "\"" +
            "target = \"_blank\"" +  
            "A new version of Submitty is available<a/>" ;
    }

    let notes = document.getElementById("release-notes");
    notes.style.display = "block";
    notes.innerHTML = parseReleaseNotes(latest["body"]);
}
/**
* Update the page with latest available release and its release notes
*
* @param {Array} data - response from GitHub API, array of last few releases 
* @param {String} current_tag - tag Submitty is currently running on
*/
Update the page with latest available release and its release notes
Update the page with latest available release and its release notes
function updateReleaseNotes(data, current_tag){
    const latest = data[0];
    let tag = document.getElementById("tag");
    let container = document.getElementById("update_status");
    container.style.display = "block";
    tag.innerHTML = "Most Recent Version Available: " + latest["tag_name"];
    let text = document.getElementById("text");
    if(current_tag === latest["tag_name"]){
        text.innerHTML = "<i>Submitty is up to date!</i>";
    }else{
        text.innerHTML = "<a href = \""+ latest["html_url"] + "\"" +
            "target = \"_blank\"" +  
            "A new version of Submitty is available<a/>" ;
    }
    let notes = document.getElementById("release-notes");
    notes.style.display = "block";
    notes.innerHTML = parseReleaseNotes(latest["body"]);
}
function updateReleaseNotes ( data , current_tag ) { const latest = data [ 0 ] ; let tag = document . getElementById ( "tag" ) ; let container = document . getElementById ( "update_status" ) ; container . style . display = "block" ; tag . innerHTML = "Most Recent Version Available: " + latest [ "tag_name" ] ; let text = document . getElementById ( "text" ) ; if ( current_tag === latest [ "tag_name" ] ) { text . innerHTML = "<i>Submitty is up to date!</i>" ; } else { text . innerHTML = "<a href = \"" + latest [ "html_url" ] + "\"" + "target = \"_blank\"" + "A new version of Submitty is available<a/>" ; } let notes = document . getElementById ( "release-notes" ) ; notes . style . display = "block" ; notes . innerHTML = parseReleaseNotes ( latest [ "body" ] ) ; }
Update the page with latest available release and its release notes
Update the page with latest available release and its release notes