I am trying to disable the browser refresh button using javascript, so far I have only managed to disable the pressing of a combination of keys, but I have not achieved the button event, I have this code for that:
$(document).keydown(function (e) {
if (e.key == "F5") {
window.onbeforeunload = null;
}
The button I refer to is this: