| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2017-09-29 | Add license (GNU GPLv3+) | Teddy Wing | |
| 2017-09-29 | Enable listener for all comment fields including future ones | Teddy Wing | |
| The keyboard shortcut now works on all comment fields, including those that are created after page load. Thanks to this Stack Overflow answer from 'adeneo' and Suraj Jain: https://stackoverflow.com/questions/20330945/how-to-addeventlistener-to-future-dom-elements/20331016#20331016 It takes advantage of the fact that JavaScript events bubble. We attach an event to `<body>`, which we can be sure will always be there (even across GitHub's Turbolinks), and in the keydown event listener check to see whether we were called on the right element. | |||
| 2017-09-29 | Add a key event listener to open Preview pane on GitHub comments | Teddy Wing | |
| Use Apple-Option-P to open the preview pane and toggle it closed. GitHub uses Apple-Shift-P by default to toggle the Preview pane. I need this new shortcut because Firefox uses Apple-Shift-P to open new private browsing windows, shadowing it from GitHub. This is the initial working version of this script. It doesn't currently support comment fields that are added to the page after page load. | |||
