The README file had a snippet of JavaScript that opened all links that were in a list in a new window.
<script type="text/javascript">
var list = document.querySelector("ul");
var links = list.getElementsByTagName("a");
for (var i = 0; i < links.length; i++) {
links[i].setAttribute("target", "_blank");
}
</script>
However, what I really wanted to do was open the PDF files in a new window. So, this:
<script type="text/javascript">
var pdfs = document.querySelectorAll("a[href$='.pdf']");
for (var i = 0; i < pdfs.length; i++) {
pdfs[i].setAttribute("target", "_blank");
}
</script>
The README file had a snippet of JavaScript that opened all links that were in a list in a new window.
However, what I really wanted to do was open the PDF files in a new window. So, this: