pgwbrowser.js
function(version, separator) {
            if (separator.substr(0, 1) == '[') {
                var splitVersion = version.split(new RegExp(separator, 'g'), 2);
            } else {
                var splitVersion = version.split(separator, 2);
            }

            if (separator != '.') {
                version = version.replace(new RegExp(separator, 'g'), '.');
            }

            pgwBrowser.os.fullVersion = version;

            // Major version
            if (splitVersion[0]) {
                pgwBrowser.os.majorVersion = parseInt(splitVersion[0]);
            }

            // Minor version
            if (splitVersion[1]) {
                pgwBrowser.os.minorVersion = parseInt(splitVersion[1]);
            }

            return true;
        }
function(version, separator) {
            if (separator.substr(0, 1) == '[') {
                var splitVersion = version.split(new RegExp(separator, 'g'), 2);
            } else {
                var splitVersion = version.split(separator, 2);
            }

            if (separator != '.') {
                version = version.replace(new RegExp(separator, 'g'), '.');
            }

            pgwBrowser.os.fullVersion = version;

            // Major version
            if (splitVersion[0]) {
                pgwBrowser.os.majorVersion = parseInt(splitVersion[0]);
            }

            // Minor version
            if (splitVersion[1]) {
                pgwBrowser.os.minorVersion = parseInt(splitVersion[1]);
            }

            return true;
        }
function ( version , separator ) { if ( separator . substr ( 0 , 1 ) == '[' ) { var splitVersion = version . split ( new RegExp ( separator , 'g' ) , 2 ) ; } else { var splitVersion = version . split ( separator , 2 ) ; } if ( separator != '.' ) { version = version . replace ( new RegExp ( separator , 'g' ) , '.' ) ; } pgwBrowser . os . fullVersion = version ; // Major version if ( splitVersion [ 0 ] ) { pgwBrowser . os . majorVersion = parseInt ( splitVersion [ 0 ] ) ; } // Minor version if ( splitVersion [ 1 ] ) { pgwBrowser . os . minorVersion = parseInt ( splitVersion [ 1 ] ) ; } return true ; }
Set OS version
Set OS version