- This topic has 1 reply, 2 voices, and was last updated 5 years, 10 months ago by .
Viewing 2 posts – 1 through 2 (of 2 total)
Viewing 2 posts – 1 through 2 (of 2 total)
Posted
by
Forums › Forums › Search & Filter Pro › Quick Fix the missing “?” in the url when using select
Quick Fix the missing “?” in the url when using select
/search-filter-pro/public/assets/js/search-filter-build.js line:4312
Don’t forget to regenerate the search-filter-build.min.js
/////// CODE /////////
this.updateUrlHistory = function(ajax_results_url)
{
//ERIC LANGLOIS
//EMBLEME COMMUNICATION
//FIX THE MISSING “?”
if(ajax_results_url != ”){
if(ajax_results_url.startsWith(“?”) != true ){
ajax_results_url = “?”+ajax_results_url;
}
}
var self = this;
var use_history_api = 0;
if (window.history && window.history.pushState)
{
use_history_api = $this.attr(“data-use-history-api”);
}
if((self.update_ajax_url==1)&&(use_history_api==1))
{
//now check if the browser supports history state push 🙂
if (window.history && window.history.pushState)
{
history.pushState(null, null, ajax_results_url);
}
}
}