Created
November 9, 2020 18:01
-
-
Save Hamatti/11de9fd64e226738c00c8a8b2fad024e to your computer and use it in GitHub Desktop.
A bookmarklet to add keyboard / presentation clicker support to ON24.com webinar platform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Juha-Matti Santala / @hamatti | |
* | |
* This code is a bookmarklet that adds support to ON24.com's presentator view for arrow right/left and page down/up keys | |
* to switch slides. | |
* | |
* If your presentation clicker sends different keys to the computer when clicking next/prev, you can adjust the code by | |
* changing the if clauses | |
*/ | |
javascript:void(function() { const prev = document.querySelector('.arrow-btn.prev'); const next = document.querySelector('.arrow-btn.next'); const LEFT_ARROW = "ArrowLeft"; const RIGHT_ARROW = "ArrowRight"; const PAGE_DOWN = 'PageDown'; const PAGE_UP = 'PageUp'; document.onkeyup = event => { if(event.code === LEFT_ARROW || event.code === PAGE_UP) { prev.click(); } else if (event.code === RIGHT_ARROW || event.code === PAGE_DOWN) { next.click(); } }})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment