vendor/assets/elfinder_OLD/js/elfinder.full.js
function(url) {
		if (url.match(/^http/i)) {
			return url;
		}
		if (url.substr(0,2) === '//') {
			return window.location.protocol + url;
		}
		var root = window.location.protocol + '//' + window.location.host,
			reg  = /[^\/]+\/\.\.\//,
			ret;
		if (url.substr(0, 1) === '/') {
			ret = root + url;
		} else {
			ret = root + window.location.pathname.replace(/\/[^\/]+$/, '/') + url;
		}
		ret = ret.replace('/./', '/');
		while(reg.test(ret)) {
			ret = ret.replace(reg, '');
		}
		return ret;
	}
function(url) {
		if (url.match(/^http/i)) {
			return url;
		}
		if (url.substr(0,2) === '//') {
			return window.location.protocol + url;
		}
		var root = window.location.protocol + '//' + window.location.host,
			reg  = /[^\/]+\/\.\.\//,
			ret;
		if (url.substr(0, 1) === '/') {
			ret = root + url;
		} else {
			ret = root + window.location.pathname.replace(/\/[^\/]+$/, '/') + url;
		}
		ret = ret.replace('/./', '/');
		while(reg.test(ret)) {
			ret = ret.replace(reg, '');
		}
		return ret;
	}
function ( url ) { if ( url . match ( / ^http / i ) ) { return url ; } if ( url . substr ( 0 , 2 ) === '//' ) { return window . location . protocol + url ; } var root = window . location . protocol + '//' + window . location . host , reg = / [^\/]+\/\.\.\/ / , ret ; if ( url . substr ( 0 , 1 ) === '/' ) { ret = root + url ; } else { ret = root + window . location . pathname . replace ( / \/[^\/]+$ / , '/' ) + url ; } ret = ret . replace ( '/./' , '/' ) ; while ( reg . test ( ret ) ) { ret = ret . replace ( reg , '' ) ; } return ret ; }
Convert from relative URL to abstract URL based on current URL

@param  String  URL
@return String
Convert from relative URL to abstract URL based on current URL