2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00
contrib-munin/templates/munstrap/static/js/querystring.min.js
2017-01-28 01:23:48 +01:00

2 lines
444 B
JavaScript

function Querystring(a){this.params={};var b=window.location.search;null==a&&(a=b.substring(1,b.length));if(0!=a.length)for(a=a.replace(/\+/g," "),a=a.split("&"),b=0;b<a.length;b++){var c=a[b].split("="),d=decodeURIComponent(c[0]),c=2==c.length?decodeURIComponent(c[1]):d;this.params[d]=c}}Querystring.prototype.get=function(a,b){var c=this.params[a];return null!=c?c:b};Querystring.prototype.contains=function(a){return null!=this.params[a]};