function infscr_determinepath(path) {

            var opts = this.options;

            if ($.isFunction(opts.pathParse)) {

                this._debug('pathParse');
                return [path];

            } else if (path.match(/^(.*?)\b2\b(.*?$)/)) {
                path = path.match(/^(.*?)\b2\b(.*?$)/).slice(1);

                // if there is any 2 in the url at all.    
            } else if (path.match(/^(.*?)2(.*?$)/)) {

                // page= is used in django:
                // http://www.infinite-scroll.com/changelog/comment-page-1/#comment-127
                if (path.match(/^(.*?page=)2(\/.*|$)/)) {
                    path = path.match(/^(.*?page=)2(\/.*|$)/).slice(1);
                    return path;
                }

                path = path.match(/^(.*?)2(.*?$)/).slice(1);

            } else {

                // page= is used in drupal too but second page is page=1 not page=2:
                // thx Jerod Fritz, vladikoff
                if (path.match(/^(.*?page=)1(\/.*|$)/)) {
                    path = path.match(/^(.*?page=)1(\/.*|$)/).slice(1);
                    return path;
                } else {
                    this._debug('Sorry, we couldn\'t parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.');
                    // Get rid of isInvalidPage to allow permalink to state
                    opts.isInvalidPage = true;  //prevent it from running on this page.
                }
            }
            this._debug('determinePath', path);
            return path;

        }
// find the number to increment in the path.
find the number to increment in the path.
find the number to increment in the path .
function infscr_determinepath(path) {
            var opts = this.options;
            if ($.isFunction(opts.pathParse)) {
                this._debug('pathParse');
                return [path];
            } else if (path.match(/^(.*?)\b2\b(.*?$)/)) {
                path = path.match(/^(.*?)\b2\b(.*?$)/).slice(1);
            } else if (path.match(/^(.*?)2(.*?$)/)) {
                if (path.match(/^(.*?page=)2(\/.*|$)/)) {
                    path = path.match(/^(.*?page=)2(\/.*|$)/).slice(1);
                    return path;
                }
                path = path.match(/^(.*?)2(.*?$)/).slice(1);
            } else {
                if (path.match(/^(.*?page=)1(\/.*|$)/)) {
                    path = path.match(/^(.*?page=)1(\/.*|$)/).slice(1);
                    return path;
                } else {
                    this._debug('Sorry, we couldn\'t parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.');
                    opts.isInvalidPage = true;  
                }
            }
            this._debug('determinePath', path);
            return path;
        }
function infscr_determinepath ( path ) { var opts = this . options ; if ( $ . isFunction ( opts . pathParse ) ) { this . _debug ( 'pathParse' ) ; return [ path ] ; } else if ( path . match ( / ^(.*?)\b2\b(.*?$) / ) ) { path = path . match ( / ^(.*?)\b2\b(.*?$) / ) . slice ( 1 ) ; } else if ( path . match ( / ^(.*?)2(.*?$) / ) ) { if ( path . match ( / ^(.*?page=)2(\/.*|$) / ) ) { path = path . match ( / ^(.*?page=)2(\/.*|$) / ) . slice ( 1 ) ; return path ; } path = path . match ( / ^(.*?)2(.*?$) / ) . slice ( 1 ) ; } else { if ( path . match ( / ^(.*?page=)1(\/.*|$) / ) ) { path = path . match ( / ^(.*?page=)1(\/.*|$) / ) . slice ( 1 ) ; return path ; } else { this . _debug ( 'Sorry, we couldn\'t parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.' ) ; opts . isInvalidPage = true ; } } this . _debug ( 'determinePath' , path ) ; return path ; }
find the number to increment in the path.
find the number to increment in the path .
// if there is any 2 in the url at all.     // page= is used in django: // http://www.infinite-scroll.com/changelog/comment-page-1/#comment-127 // page= is used in drupal too but second page is page=1 not page=2: // thx Jerod Fritz, vladikoff // Get rid of isInvalidPage to allow permalink to state //prevent it from running on this page.