From 24e05a0b065b7d01417efeabb07523b3cc8c0bf0 Mon Sep 17 00:00:00 2001 From: pepperpepperpepper Date: Mon, 16 Nov 2015 16:35:11 -0800 Subject: gallery first draft --- gallery/js/querystring.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gallery/js/querystring.js (limited to 'gallery/js/querystring.js') diff --git a/gallery/js/querystring.js b/gallery/js/querystring.js new file mode 100644 index 0000000..79c2a4d --- /dev/null +++ b/gallery/js/querystring.js @@ -0,0 +1,13 @@ +(function($) { + $.QueryString = (function(a) { + if (a == "") return {}; + var b = {}; + for (var i = 0; i < a.length; ++i) + { + var p=a[i].split('='); + if (p.length != 2) continue; + b[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " ")); + } + return b; + })(window.location.search.substr(1).split('&')) +})(jQuery); -- cgit v1.2.3-70-g09d2