Ok from @rlambert27's comment on the gist
```js
if (opts.refreshOnClick) {
    _pe.document.on('click', function (e) {
        // If there is a click on the page, but ignore middle/right mouse buttons
        if (typeof e.button === 'undefined' || e.button === _pe.leftMouseButton) {
            // Only start the session time out after the initial idle period has passed
            // and the action has occurred outside the the ajax limiter's duration
            if (lastActivity >= 1 && (getCurrentTimeMs() - lastAjaxCall) > opts.ajaxLimiter) {
                lastAjaxCall = getCurrentTimeMs();
                start_liveTimeout();
            }
            lastActivity = getCurrentTimeMs();
        }
    });
}
```