aboutsummaryrefslogtreecommitdiff
path: root/src/content/scrolls.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/scrolls.js')
-rw-r--r--src/content/scrolls.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/content/scrolls.js b/src/content/scrolls.js
index 540703e..bc88e43 100644
--- a/src/content/scrolls.js
+++ b/src/content/scrolls.js
@@ -25,4 +25,16 @@ const scrollBottom = (page) => {
page.scrollTo(x, y);
};
-export { scrollLines, scrollPages, scrollTop, scrollBottom }
+const scrollLeft = (page) => {
+ let x = 0;
+ let y = page.scrollY;
+ page.scrollTo(x, y);
+};
+
+const scrollRight = (page) => {
+ let x = page.scrollMaxX;
+ let y = page.scrollY;
+ page.scrollTo(x, y);
+};
+
+export { scrollLines, scrollPages, scrollTop, scrollBottom, scrollLeft, scrollRight }