Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
18 lines
388 B
JavaScript
Executable file
18 lines
388 B
JavaScript
Executable file
'use strict';
|
|
|
|
var utils = window.utils || {};
|
|
|
|
if (!utils.extractParams) {
|
|
utils.extractParams = function extractParams(url) {
|
|
if (!url) {
|
|
return -1;
|
|
}
|
|
var ret = {};
|
|
var params = url.split('&');
|
|
for (var i = 0; i < params.length; i++) {
|
|
var currentParam = params[i].split('=');
|
|
ret[currentParam[0]] = currentParam[1];
|
|
}
|
|
return ret;
|
|
};
|
|
}
|