src/assets/js/javascript.js
function parse(query) {
        if (query[0] == "?") query = query.slice(1);
        var pairs = query.split("&"),
            obj = {};

        for (var i in pairs) {
            var pair = pairs[i].split("="),
                key = decodeURIComponent(pair[0]),
                value = pair[1] ? decodeURIComponent(pair[1]) : "";

            obj[key] = value;
        }

        return obj;
    }
function parse(query) {
        if (query[0] == "?") query = query.slice(1);
        var pairs = query.split("&"),
            obj = {};

        for (var i in pairs) {
            var pair = pairs[i].split("="),
                key = decodeURIComponent(pair[0]),
                value = pair[1] ? decodeURIComponent(pair[1]) : "";

            obj[key] = value;
        }

        return obj;
    }
Parses URL query string.
@param {string} query
@returns {object}