Improve output: distinguish between failed assertions (failures) and unexpected exceptions (errors), and print a filtered stack trace for any exception.
This commit is contained in:
commit
4f2e303079
1839 changed files with 235630 additions and 0 deletions
39
webapp/web/js/jquery_plugins/getURLParam.js
vendored
Normal file
39
webapp/web/js/jquery_plugins/getURLParam.js
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* Copyright (c) 2006 Mathias Bank (http://www.mathias-bank.de)
|
||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||
*
|
||||
* Thanks to Hinnerk Ruemenapf - http://hinnerk.ruemenapf.de/ for bug reporting and fixing.
|
||||
*/
|
||||
jQuery.extend({
|
||||
/**
|
||||
* Returns get parameters.
|
||||
*
|
||||
* If the desired param does not exist, null will be returned
|
||||
*
|
||||
* @example value = $.getURLParam("paramName");
|
||||
*/
|
||||
getURLParam: function(strParamName){
|
||||
var strReturn = "";
|
||||
var strHref = window.location.href;
|
||||
var bFound=false;
|
||||
|
||||
var cmpstring = strParamName + "=";
|
||||
var cmplen = cmpstring.length;
|
||||
|
||||
if ( strHref.indexOf("?") > -1 ){
|
||||
var strQueryString = strHref.substr(strHref.indexOf("?")+1);
|
||||
var aQueryString = strQueryString.split("&");
|
||||
for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
|
||||
if (aQueryString[iParam].substr(0,cmplen)==cmpstring){
|
||||
var aParam = aQueryString[iParam].split("=");
|
||||
strReturn = aParam[1];
|
||||
bFound=true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (bFound==false) return null;
|
||||
return strReturn;
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue