PageSourceSearch

https://ponyexpress.kz/local/templates/ponyexpress_main/js/queryParser.js

js ponyexpress.kz collected 2026-09-26 09:55:31 UTC 934 bytes, 43 lines download raw bytes

1(function($) {
2
3	$.extend({
4		getParams: getParams
5	});
6
7	var cache = {};
8
9	function getParams(queryString) {
10		if ($.type(queryString) != 'string') {
11			queryString = window.location.search;
12		}
13		if (queryString[0] == '?') {
14			queryString = queryString.substr(1);
15		}
16		if (!cache[queryString]) {
17			cache[queryString] = splitParams(queryString);
18		}
19		return cache[queryString];
20	}
21
22	function splitParams(queryString) {
23		var i, kv, kfloat, vfloat,
24			queryObj = {},
25			pairs = queryString.split('&');
26		if (pairs[0].length > 0) {
27			for (i = 0; i < pairs.length; ++i) {
28				kv = pairs[i].split('=');
29				if (kv.length > 1) {
30					kfloat = parseFloat(kv[0]);
31					vfloat = parseFloat(kv[1]);
32					kv[0] = kfloat ? kfloat : decodeURIComponent(kv[0]);
33					kv[1] = vfloat ? vfloat : decodeURIComponent(kv[1]);
34					queryObj[kv[0]] = kv[1];
35				} else {
36					queryObj[kv[0]] = null;
37				}
38			}
39		}
40		return queryObj;
41	}
42
43})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.