aboutsummaryrefslogtreecommitdiffstats
path: root/netflix-esc.user.js
diff options
context:
space:
mode:
Diffstat (limited to 'netflix-esc.user.js')
-rw-r--r--netflix-esc.user.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/netflix-esc.user.js b/netflix-esc.user.js
index 52230e2..509786f 100644
--- a/netflix-esc.user.js
+++ b/netflix-esc.user.js
@@ -37,6 +37,22 @@ document.addEventListener(
// Show info modal with 'i'.
if (e.key === 'i') {
info_modal_open();
+
+ return;
+ }
+
+ // Page left on hovered row.
+ if (e.key === 'h') {
+ row_left();
+
+ return;
+ }
+
+ // Page right on hovered row.
+ if (e.key === 'l') {
+ row_right();
+
+ return;
}
}
);
@@ -69,3 +85,24 @@ function info_modal_open () {
);
more_info_button.dispatchEvent(click);
}
+
+function row_left () {
+ var page_left = document.querySelector('.lolomoRow:hover .handlePrev');
+
+ var click = new MouseEvent(
+ 'click',
+ { buttons: 1, bubbles: true }
+ );
+ page_left.dispatchEvent(click);
+}
+
+
+function row_right () {
+ var page_right = document.querySelector('.lolomoRow:hover .handleNext');
+
+ var click = new MouseEvent(
+ 'click',
+ { buttons: 1, bubbles: true }
+ );
+ page_right.dispatchEvent(click);
+}