Some template cleanup

This commit is contained in:
2021-01-28 18:37:41 +00:00
parent 2351201e13
commit cc233e0223
7 changed files with 28 additions and 56 deletions

View File

@@ -30,19 +30,19 @@
//Get query string value
var searchUrl=location.search;
if(key!="") {
if(key!=="") {
oldValue = getParameterByName(key);
removeVal=key+"="+oldValue;
if(searchUrl.indexOf('?'+removeVal+'&')!= "-1") {
if(searchUrl.indexOf('?'+removeVal+'&')!== "-1") {
urlValue=urlValue.replace('?'+removeVal+'&','?');
}
else if(searchUrl.indexOf('&'+removeVal+'&')!= "-1") {
else if(searchUrl.indexOf('&'+removeVal+'&')!== "-1") {
urlValue=urlValue.replace('&'+removeVal+'&','&');
}
else if(searchUrl.indexOf('?'+removeVal)!= "-1") {
else if(searchUrl.indexOf('?'+removeVal)!== "-1") {
urlValue=urlValue.replace('?'+removeVal,'');
}
else if(searchUrl.indexOf('&'+removeVal)!= "-1") {
else if(searchUrl.indexOf('&'+removeVal)!== "-1") {
urlValue=urlValue.replace('&'+removeVal,'');
}
}