From f1cf59ce2df9204f818cfd038538a2a31a5c2262 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Mon, 21 Dec 2020 18:52:51 +0530 Subject: Adds qutebrowser config --- config/qutebrowser/greasemonkey/hris-reg.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 config/qutebrowser/greasemonkey/hris-reg.js (limited to 'config/qutebrowser/greasemonkey/hris-reg.js') diff --git a/config/qutebrowser/greasemonkey/hris-reg.js b/config/qutebrowser/greasemonkey/hris-reg.js new file mode 100644 index 0000000..852d357 --- /dev/null +++ b/config/qutebrowser/greasemonkey/hris-reg.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 *://hris.peoplelabs.com/attendance/regularization/apply-regularization/* +// ==/UserScript== + +const $ = document.querySelector.bind(document); + +const keys = { + r: () => { + $('#firstintime').value = '10:30'; + $('#lastouttime').value = '18:30'; + $('#reason').value = 'Work from home'; + setTimeout(() => $('input[type="submit"]').click(), 500); + }, +}; + +document.addEventListener('keydown', (e) => { + if (keys[e.key] && e.ctrlKey) { + keys[e.key](); + } +}); + + -- cgit v1.3.1