function showDeleteConfirmation(){
	document.getElementById("confirm-delete-prompt").style.display = "block";
}

document.getElementById("confirm-delete").addEventListener("click", showDeleteConfirmation);

function showDeleteConfirmation(){
	document.getElementById("confirm-delete-prompt").style.display = "block";
}

if(document.getElementById("confirm-delete") !== null){
	document.getElementById("confirm-delete").addEventListener("click", showDeleteConfirmation);
}

Check if not null first.