I have the following ajaxError
$(document).ajaxError(function (e, xhr, settings) {
if ( settings.url == "/users/sign_in" ) {
if (xhr.status == 401) {
$('#notice_signin').html(xhr.responseText);
$('#notice_signin').addClass("alert").addClass("alert-error");
}
}
});
the thing is that settings.url has different params such as locale, source, etc.. so settings.url
never matches /users/sign_in
but is /users/sign_in?lang=fr&source=fb
what is an easy way to strip the params?