MCPcopy Index your code
hub / github.com/webodf/ViewerJS / parseSearchParameters

Function parseSearchParameters

PluginLoader.js:145–160  ·  view source on GitHub ↗
(location)

Source from the content-addressed store, hash-verified

143
144
145 function parseSearchParameters(location) {
146 var parameters = {},
147 search = location.search || "?";
148
149 search.substr(1).split('&').forEach(function (q) {
150 // skip empty strings
151 if (!q) {
152 return;
153 }
154 // if there is no '=', have it handled as if given key was set to undefined
155 var s = q.split('=', 2);
156 parameters[decodeURIComponent(s[0])] = decodeURIComponent(s[1]);
157 });
158
159 return parameters;
160 }
161
162
163 window.onload = function () {

Callers 1

PluginLoader.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected