Sha256: c623dea10572e7bc5bb5e4fb40de0db41c9b592c3e5bf3024b71bd0d33fdf2b5

Contents?: true

Size: 584 Bytes

Versions: 2

Compression:

Stored size: 584 Bytes

Contents

window.location.params = function () {
    var map = new Array();

    var url = window.location.search;
    if (!url || url.length <= 0) {
        return map;
    }

    var pos = url.indexOf('?');
    if (-1 == pos) {
        return map;
    }
    var paras = url.substring(pos + 1);
    paras = paras.split('&');
    for (var n = 0; n < paras.length; n++) {
        var pos = paras[n].indexOf('=');
        var key = paras[n].substring(0, pos);
        var value = (pos + 1 ) >= paras[n].length ? "" : paras[n].substring(pos + 1);
        map[key] = value;
    }
    return map;
};

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jextend-0.1.4 vendor/assets/javascripts/jextend/window.location.params.js
jextend-0.1.3 vendor/assets/javascripts/jextend/window.location.params.js