code: function PDFPresentationMode_mouseScroll(delta) {
        if (!this.active) {
          return;
        }
        var MOUSE_SCROLL_COOLDOWN_TIME = 50;
        var PAGE_SWITCH_THRESHOLD = 120;
        var PageSwitchDirection = {
          UP: -1,
          DOWN: 1
        };
  
        var currentTime = (new Date()).getTime();
        var storedTime = this.mouseScrollTimeStamp;
  
        // If we've already switched page, avoid accidentally switching again.
        if (currentTime > storedTime &&
            currentTime - storedTime < MOUSE_SCROLL_COOLDOWN_TIME) {
          return;
        }
        // If the scroll direction changed, reset the accumulated scroll delta.
        if ((this.mouseScrollDelta > 0 && delta < 0) ||
            (this.mouseScrollDelta < 0 && delta > 0)) {
          this._resetMouseScrollState();
        }
        this.mouseScrollDelta += delta;
  
        if (Math.abs(this.mouseScrollDelta) >= PAGE_SWITCH_THRESHOLD) {
          var pageSwitchDirection = (this.mouseScrollDelta > 0) ?
            PageSwitchDirection.UP : PageSwitchDirection.DOWN;
          var page = PDFViewerApplication.page;
          this._resetMouseScrollState();
  
          // If we're at the first/last page, we don't need to do anything.
          if ((page === 1 && pageSwitchDirection === PageSwitchDirection.UP) ||
              (page === PDFViewerApplication.pagesCount &&
               pageSwitchDirection === PageSwitchDirection.DOWN)) {
            return;
          }
          PDFViewerApplication.page = (page + pageSwitchDirection);
          this.mouseScrollTimeStamp = currentTime;
        }
      }
docs: Switches page when the user scrolls (using a scroll wheel or a touchpad)
  with large enough motion, to prevent accidental page switches.
  @param {number} delta - The delta value from the mouse event.