Skip to content

Commit

Permalink
Fixed link injection js syntax error & added error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
eralpkaraduman committed Oct 10, 2018
1 parent 8f72904 commit 6c080da
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions _layouts/cv.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,23 @@
directLinkElement.text = "Click here to download"
directLinkElement.href = latestReleaseUrl;
var directLinkContainerElement = document.createElement("div");
directLinkCoRtainerElement.appendChild(directLinkTextNode);
directLinkContainerElement.appendChild(directLinkTextNode);
directLinkContainerElement.appendChild(directLinkElement);

var elementToReplace = document.getElementById("footer");
elementToReplace.appendChild(directLinkContainerElement);
}
else {
console.error("PDF download link injection failed: Missing asses in response");
}
}
catch(e) {
console.error("PDF download link injection failed: " + e);
}
catch(e) { }
}
}
else{
console.error("PDF download link injection failed: Response status code not 200 ("+req.status+")");
}
}
};
req.open("GET", "https://api.github.com/repos/{{site.github.repository_nwo}}/releases/latest", true);
Expand All @@ -42,7 +50,7 @@
{{ content }}
<p id="footer">
This CV was Generated on {{ site.time | date: "%B %-d %Y" }}<br>
Download the latest version:
Latest Release:
<a id="latest-version" href="{{site.github.repository_url}}/releases/latest">
{{site.github.repository_url}}/releases/latest
</a><br>
Expand Down

0 comments on commit 6c080da

Please sign in to comment.