diff options
Diffstat (limited to 'config/qutebrowser/greasemonkey/#gh-pr.js#')
| -rw-r--r-- | config/qutebrowser/greasemonkey/#gh-pr.js# | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/config/qutebrowser/greasemonkey/#gh-pr.js# b/config/qutebrowser/greasemonkey/#gh-pr.js# new file mode 100644 index 0000000..26d444a --- /dev/null +++ b/config/qutebrowser/greasemonkey/#gh-pr.js# @@ -0,0 +1,27 @@ +// ==UserScript== +// @name Github PR helper +// @namespace phenax.github.io +// @version 0.0.0 +// @description Github PR helper +// @author Akshay Nair +// @match *://github.com/*/pull/*/files +// ==/UserScript== + +const keys = { + n: () => document.querySelector('.js-reviewed-toggle:not(.js-reviewed-file)').click(), + N: () => Array.from(document.querySelectorAll('.js-reviewed-file')).slice(-1)[0].click(), + //j: () => { + //const $el = document.querySelector('.js-reviewed-toggle:not(.js-reviewed-file)'); + //if ($el) { + + //} + //}, +}; +w +document.addEventListener('keydown', (e) => { + console.log(e.key, e.ctrlKey); + if (keys[e.key] && e.ctrlKey) { + keys[e.key](); + } +}); + |
