summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-03-08 11:28:21 +0300
committerAndrew Dolgov <[email protected]>2011-03-08 11:28:21 +0300
commitec320224dbf4b3224245f298bac3145ba139d19a (patch)
treebf613fde9b916d2839f27243f0000a198bc5bc59 /functions.js
parent10690c19da72ebdb9be2ebe220681528bdec81c7 (diff)
getURLParam: use Prototype
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js24
1 files changed, 2 insertions, 22 deletions
diff --git a/functions.js b/functions.js
index 423b0b539..713b3b46a 100644
--- a/functions.js
+++ b/functions.js
@@ -370,28 +370,8 @@ function dropboxSelect(e, v) {
}
}
-// originally stolen from http://www.11tmr.com/11tmr.nsf/d6plinks/MWHE-695L9Z
-// bugfixed just a little bit :-)
-function getURLParam(strParamName){
- var strReturn = "";
- var strHref = window.location.href;
-
- if (strHref.indexOf("#") == strHref.length-1) {
- strHref = strHref.substring(0, strHref.length-1);
- }
-
- if ( strHref.indexOf("?") > -1 ){
- var strQueryString = strHref.substr(strHref.indexOf("?"));
- var aQueryString = strQueryString.split("&");
- for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
- if (aQueryString[iParam].indexOf(strParamName + "=") > -1 ){
- var aParam = aQueryString[iParam].split("=");
- strReturn = aParam[1];
- break;
- }
- }
- }
- return strReturn;
+function getURLParam(param){
+ return String(window.location.href).parseQuery()[param];
}
function leading_zero(p) {