Skip to content

Commit 4854eaa

Browse files
authored
Merge pull request #7 from dtekcth/Possibility-to-change-to-next-PR-with-spacebar
Add possibility to change to next PR with spacebar
2 parents 7d944c1 + d5de9e1 commit 4854eaa

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/templates/pr.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@
100100
next_pr();
101101
}
102102
}
103+
104+
// Naively switch to next PR when pressing spacebar
105+
document.onkeypress = function (e) {
106+
if (e.keyCode === 32) {
107+
next_pr()
108+
}
109+
};
103110

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

117-
</html>
124+
</html>

0 commit comments

Comments
 (0)