Skip to content

Commit

Permalink
feat?: Define toggle key
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Oct 16, 2024
1 parent a7efea3 commit 9834f3f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/atsphinx/revealjs_rtd/static/atsphinx-revealjs-rtd/rtd.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
window.RevealRTD = window.RevealRTD || {
id: 'rtd',
init() {
return;
init(reveal) {
const deck = reveal;
deck.addKeyBinding({keyCode: 68, key: 'D', description: 'Toggle RTD widget'}, function() {
const flyout = document.querySelector("readthedocs-flyout");
if (!flyout) return;
flyout.style.display = flayout.style.display ? "" : "none";
});
}
}

0 comments on commit 9834f3f

Please sign in to comment.