Hello stackoverflow community. I need ideas and help. Is it possible to remove that pagination from link? for example: http://example.com/comp-filter/page/2/ So i need to remove that page/2/ and i do not know how, because that number can be from 1 to eternity. So what could i do to remove it using jquery or javascript. Help please? For replacing parameters i was using:
function setGetParameter(paramName, paramValue)
{
var url = window.location.href;
if (url.indexOf(paramName + "=") >= 0)
{
var prefix = url.substring(0, url.indexOf(paramName));
var suffix = url.substring(url.indexOf(paramName));
suffix = suffix.substring(suffix.indexOf("=") + 1);
suffix = (suffix.indexOf("&") >= 0) ? suffix.substring(suffix.indexOf("&")) : "";
url = prefix + paramName + "=" + paramValue + suffix;
}
else
{
if (url.indexOf("?") < 0)
url += "?" + paramName + "=" + paramValue;
else
url += "&" + paramName + "=" + paramValue;
}
return url;
}
But chaning this code wont help...