/* Sortt @License MIT @Author 6543 */ //safe url sort param global //creat global function with main routine window.sortt=function(normsort,revsort,isdefault){ //sortTable [normsort] (revsort) (isdefault) //normsort is needet if (typeof normsort === 'undefined') return false; //default values of optinal parameters if (typeof revsort === 'undefined') revsort = ""; if (typeof isdefault === 'undefined') isdefault = false; if (!(typeof isdefault === 'boolean')) isdefault = false; // parse URL url_sort=""; if (window.location.search.indexOf("sort=") < 0) { if ( isdefault ) url_sort = normsort; } else { url_sort=window.location.search.substr(window.location.search.indexOf("sort=")+5); url_sort=url_sort.substr(0,url_sort.indexOf("&")); } //window.location.replace("http://localhost:3000/admin/repos?sort=feweststars&q=&tab="); };