MCPcopy Index your code
hub / github.com/mailru/FileAPI / _getUrl

Function _getUrl

lib/FileAPI.Flash.js:685–707  ·  view source on GitHub ↗
(url, params)

Source from the content-addressed store, hash-verified

683
684
685 function _getUrl(url, params){
686 if( !_rhttp.test(url) ){
687 if( /^\.\//.test(url) || '/' != url.charAt(0) ){
688 var path = location.pathname;
689 path = path.substr(0, path.lastIndexOf('/'));
690 url = (path +'/'+ url).replace('/./', '/');
691 }
692
693 if( '//' != url.substr(0, 2) ){
694 url = '//' + location.host + url;
695 }
696
697 if( !_rhttp.test(url) ){
698 url = location.protocol + url;
699 }
700 }
701
702 if( params ){
703 url += (/\?/.test(url) ? '&' : '?') + params;
704 }
705
706 return url;
707 }
708
709
710 function _makeFlashImage(opts, base64, fn){

Callers 2

FileAPI.Flash.jsFile · 0.85
_makeFlashImageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected