src/util/WWUtil.js
function () {
                var protocol = window.location.protocol,
                    host = window.location.host,
                    path = window.location.pathname,
                    pathParts = path.split("/"),
                    newPath = "";

                for (var i = 0, len = pathParts.length; i < len - 1; i++) {
                    if (pathParts[i].length > 0) {
                        newPath = newPath + "/" + pathParts[i];
                    }
                }

                return protocol + "//" + host + newPath;
            }
function () {
                var protocol = window.location.protocol,
                    host = window.location.host,
                    path = window.location.pathname,
                    pathParts = path.split("/"),
                    newPath = "";

                for (var i = 0, len = pathParts.length; i < len - 1; i++) {
                    if (pathParts[i].length > 0) {
                        newPath = newPath + "/" + pathParts[i];
                    }
                }

                return protocol + "//" + host + newPath;
            }
function ( ) { var protocol = window . location . protocol , host = window . location . host , path = window . location . pathname , pathParts = path . split ( "/" ) , newPath = "" ; for ( var i = 0 , len = pathParts . length ; i < len - 1 ; i ++ ) { if ( pathParts [ i ] . length > 0 ) { newPath = newPath + "/" + pathParts [ i ] ; } } return protocol + "//" + host + newPath ; }
Returns the current location URL as obtained from window.location with the last path component
removed.
@returns {String} The current location URL with the last path component removed.
Returns the current location URL as obtained from window . location with the last path component removed .