Most popular
$(window).on('load', function() {
if(window.location.href.includes("?popular")) {
$.ajax({
type: 'POST',
url: document.getElementById("filter").getAttribute("action"),
success: function(response) {},
});
}
});
+ если чекбокс сам не меняется - его надо поменять.
document.querySelector("input[type='checkbox']").checked = true;