You can disable the button based on favIcon
value as follows -
$("#button").prop("disabled",favIcon);
And to run the above code, wrap it inside document ready like -
$(function(){
$("#button").prop("disabled",favIcon);
});
More on .prop()