lib/GBlib.js
// Finds the next chapters in the description
Finds the next chapters in the description
Finds the next chapters in the description
function findNextPossibleChapter(text) {
    var nextChapters = [];
    var number = '';
    for (i = 0; (i < text.length); i++) {
        if (text.charAt(i) == '[') {
            i++;
            while (text.charAt(i) != ']') {
                if ((text.charAt(i) == '0') ||
                    (text.charAt(i) == '1') ||
                    (text.charAt(i) == '2') ||
                    (text.charAt(i) == '3') ||
                    (text.charAt(i) == '4') ||
                    (text.charAt(i) == '5') ||
                    (text.charAt(i) == '6') ||
                    (text.charAt(i) == '7') ||
                    (text.charAt(i) == '8') ||
                    (text.charAt(i) == '9'))
                    number = number + text.charAt(i)
                i++
            }
            if (Number.isInteger(parseInt(number)))
                nextChapters.push(parseInt(number, 10))
            number = ''
        }
    }
    return nextChapters
}
function findNextPossibleChapter ( text ) { var nextChapters = [ ] ; var number = '' ; for ( i = 0 ; ( i < text . length ) ; i ++ ) { if ( text . charAt ( i ) == '[' ) { i ++ ; while ( text . charAt ( i ) != ']' ) { if ( ( text . charAt ( i ) == '0' ) || ( text . charAt ( i ) == '1' ) || ( text . charAt ( i ) == '2' ) || ( text . charAt ( i ) == '3' ) || ( text . charAt ( i ) == '4' ) || ( text . charAt ( i ) == '5' ) || ( text . charAt ( i ) == '6' ) || ( text . charAt ( i ) == '7' ) || ( text . charAt ( i ) == '8' ) || ( text . charAt ( i ) == '9' ) ) number = number + text . charAt ( i ) i ++ } if ( Number . isInteger ( parseInt ( number ) ) ) nextChapters . push ( parseInt ( number , 10 ) ) number = '' } } return nextChapters }
Finds the next chapters in the description
Finds the next chapters in the description