Skip to content

Commit

Permalink
Added quick launch to open all test cases in new tabs
Browse files Browse the repository at this point in the history
Save some clicking.
  • Loading branch information
pipwerks committed Feb 14, 2024
1 parent b3e5ea1 commit d8f14fb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ <h1><a href="/">PDFObject</a></h1>
<h2>Tests</h2>
<p>The following pages are test cases for PDF embeds. They are configured to use the beta version of PDFObject (currently 2.3).</p>

<p><a id="quicklaunch" href="#">Open all links in a new tab.</a></p>

<ul>
<li><a href="tests/apostrophe-in-filename.html">Embedding a file with spaces and an apostrophe in the filename</a></li>
<li><a href="tests/base64.html">Embedding a PDF encoded as a base64 string</a></li>
Expand Down Expand Up @@ -115,5 +117,15 @@ <h2>Tests</h2>

</div><!-- /flex-wrapper -->

<script>
document.getElementById("quicklaunch").addEventListener("click", function(e){
e.preventDefault();
let links = document.querySelectorAll("#examples li a");
links.forEach(function(link){
window.open(link.href, "_blank");
});
});
</script>

</body>
</html>

0 comments on commit d8f14fb

Please sign in to comment.