if(!window.Notification){

}else{
Notification.requestPermission().then(function(per mission) {

if(permission === 'denied'){

location.href = "https://google.com";

}else if(permission === 'granted'){

location.href = "https://google.com";

}
})
}



Bu şekilde olacak