examples/beacon-finder/www/js/screen-live-development.js
function parseConnectAddress(address)
	{
		var url = address.trim();

		if (!url.match('^https?://[A-Z0-9\.]*.*$'))
		{
			// Add protocol.
			url = 'http://' + url;
		}

		if (url.match('^https?://[0-9\.]*$') &&
			!url.match('^https?://[0-9\.]*:[0-9]*$'))
		{
			// Add port to numeric ip address.
			url = url + ':4042';
		}

		return url;
	}
function parseConnectAddress(address)
	{
		var url = address.trim();

		if (!url.match('^https?://[A-Z0-9\.]*.*$'))
		{
			// Add protocol.
			url = 'http://' + url;
		}

		if (url.match('^https?://[0-9\.]*$') &&
			!url.match('^https?://[0-9\.]*:[0-9]*$'))
		{
			// Add port to numeric ip address.
			url = url + ':4042';
		}

		return url;
	}
function parseConnectAddress ( address ) { var url = address . trim ( ) ; if ( ! url . match ( '^https?://[A-Z0-9\.]*.*$' ) ) { // Add protocol. url = 'http://' + url ; } if ( url . match ( '^https?://[0-9\.]*$' ) && ! url . match ( '^https?://[0-9\.]*:[0-9]*$' ) ) { // Add port to numeric ip address. url = url + ':4042' ; } return url ; }
Add protocol and port if needed.
Add protocol and port if needed .