aboutsummaryrefslogtreecommitdiff
path: root/config/qutebrowser/greasemonkey/hris-reg.js
diff options
context:
space:
mode:
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]();
+ }
+});
+
+