aboutsummaryrefslogtreecommitdiff
path: root/src/urlparser.js
blob: 7f12df900c66c47b2c705afd0efc9a99f107ba1b (plain)
1
2
3
4
5
6
7
8
9
10
define(['jquery'], function($) {
    $.urlParam = function(name) {
        var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
        if (results == null) {
            return null;
        } else {
            return results[1] || 0;
        }
    }
})