aboutsummaryrefslogtreecommitdiff
path: root/config/qutebrowser/greasemonkey/hris-reg.js
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2020-12-21 18:52:51 +0530
committerAkshay Nair <phenax5@gmail.com>2020-12-21 18:52:51 +0530
commitf1cf59ce2df9204f818cfd038538a2a31a5c2262 (patch)
tree35b0a21501615b7551514262b96e9d8113375cbc /config/qutebrowser/greasemonkey/hris-reg.js
parent6ff5a17adcf1ed72cd2f1c7bff606bdd3352b3bb (diff)
downloadnixos-config-f1cf59ce2df9204f818cfd038538a2a31a5c2262.tar.gz
nixos-config-f1cf59ce2df9204f818cfd038538a2a31a5c2262.zip
Adds qutebrowser config
Diffstat (limited to 'config/qutebrowser/greasemonkey/hris-reg.js')
-rw-r--r--config/qutebrowser/greasemonkey/hris-reg.js27
1 files changed, 27 insertions, 0 deletions
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]();
+ }
+});
+
+