BigTSDMB / ScrollRight

// ==UserScript==
// @name        ScrollRight
// @namespace   trlkly
// @description Scrolls the page all the way to the right. Good for when you zoom in.
// @exclude     *
// @version     3
// @grant       none
// @run-at      document-start
// ==/UserScript==

var maxTime = 5000; //milliseconds

const maxScroll = 2147483.583; //maximum allowed value in Firefox divided by 1000 incase it gets reduced again.
//console.log ("script fired");
var timeout = new Date();
(function scrollRight() {
  if (new Date() - timeout < maxTime) {
//    console.log ("function fired");
    window.scroll (maxScroll, scrollY);
    if (scrollX == 0 && true || document.readyState != 'complete') { setTimeout (scrollRight, 5);}
  }
})();