Skip to content

Commit

Permalink
Merge pull request #7 from dtekcth/Possibility-to-change-to-next-PR-w…
Browse files Browse the repository at this point in the history
…ith-spacebar

Add possibility to change to next PR with spacebar
  • Loading branch information
rachelambda authored May 4, 2024
2 parents 7d944c1 + d5de9e1 commit 4854eaa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/templates/pr.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@
next_pr();
}
}

// Naively switch to next PR when pressing spacebar
document.onkeypress = function (e) {
if (e.keyCode === 32) {
next_pr()
}
};

// How long a PR is shown
setInterval(next_pr, {{ pr_time }} * 1000);
Expand All @@ -114,4 +121,4 @@
<br>
</body>

</html>
</html>

0 comments on commit 4854eaa

Please sign in to comment.