public/build/static/application.js
function (url, protocol, hostname, port) {
                var match = text.xdRegExp.exec(url),
                    uProtocol, uHostName, uPort;
                if (!match) {
                    return true;
                }
                uProtocol = match[2];
                uHostName = match[3];

                uHostName = uHostName.split(':');
                uPort = uHostName[1];
                uHostName = uHostName[0];

                return (!uProtocol || uProtocol === protocol) &&
                       (!uHostName || uHostName === hostname) &&
                       ((!uPort && !uHostName) || uPort === port);
            }
function (url, protocol, hostname, port) {
                var match = text.xdRegExp.exec(url),
                    uProtocol, uHostName, uPort;
                if (!match) {
                    return true;
                }
                uProtocol = match[2];
                uHostName = match[3];

                uHostName = uHostName.split(':');
                uPort = uHostName[1];
                uHostName = uHostName[0];

                return (!uProtocol || uProtocol === protocol) &&
                       (!uHostName || uHostName === hostname) &&
                       ((!uPort && !uHostName) || uPort === port);
            }
function ( url , protocol , hostname , port ) { var match = text . xdRegExp . exec ( url ) , uProtocol , uHostName , uPort ; if ( ! match ) { return true ; } uProtocol = match [ 2 ] ; uHostName = match [ 3 ] ; uHostName = uHostName . split ( ':' ) ; uPort = uHostName [ 1 ] ; uHostName = uHostName [ 0 ] ; return ( ! uProtocol || uProtocol === protocol ) && ( ! uHostName || uHostName === hostname ) && ( ( ! uPort && ! uHostName ) || uPort === port ) ; }
Is an URL on another domain. Only works for browser use, returns
false in non-browser environments. Only used to know if an
optimized .js version of a text resource should be loaded
instead.
@param {String} url
@returns Boolean
Is an URL on another domain . Only works for browser use returns false in non - browser environments . Only used to know if an optimized . js version of a text resource should be loaded instead .