mailto link parser

This commit is contained in:
RainLoop Team 2014-08-12 17:51:34 +04:00
parent 6ad84283b7
commit 016b3eead3
8 changed files with 146 additions and 30 deletions

View file

@ -73,6 +73,30 @@ Utils.isNonEmptyArray = function (aValue)
return Utils.isArray(aValue) && 0 < aValue.length;
};
/**
* @param {string} sQueryString
* @return {Object}
*/
Utils.simpleQueryParser = function (sQueryString)
{
var
oParams = {},
aQueries = [],
aTemp = [],
iIndex = 0,
iLen = 0
;
aQueries = sQueryString.split('&');
for (iIndex = 0, iLen = aQueries.length; iIndex < iLen; iIndex++)
{
aTemp = aQueries[iIndex].split('=');
oParams[window.decodeURIComponent(aTemp[0])] = window.decodeURIComponent(aTemp[1]);
}
return oParams;
};
/**
* @param {string} aValue
* @param {string} sKey