mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
mailto link parser
This commit is contained in:
parent
6ad84283b7
commit
016b3eead3
8 changed files with 146 additions and 30 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue