unset arg is bool:false & spell corection

add improvements and sugestions of gary-kim

Co-Authored-By: Gary Kim <gary@garykim.dev>
This commit is contained in:
6543 2019-09-03 16:30:00 +02:00
parent ff4d374835
commit 38deca6a2c
Signed by: 6543
GPG Key ID: A1CA74D27FD13271
1 changed files with 3 additions and 5 deletions

View File

@ -8,17 +8,15 @@


*/ */


//creat global function with main routine //create global function with main routine
window.sortt=function(normsort,revsort,isdefault){ window.sortt=function(normsort,revsort,isdefault){
//sortTable [normsort] (revsort) (isdefault) //sortTable [normsort] (revsort) (isdefault)


//normsort is needet //normsort is needet
if (typeof normsort === 'undefined') return false; if (normsort) return false;


//default values of optinal parameters //default values of optinal parameters
if (typeof revsort === 'undefined') revsort = ""; if (revsort) revsort = "";
if (typeof isdefault === 'undefined') isdefault = false;
if (!(typeof isdefault === 'boolean')) isdefault = false;


// parse URL // parse URL
/* script check if url has already a sort= /* script check if url has already a sort=