I'm making code edits to my website within cPanel's file manager. With the latest update of cPanel v.104, after saving my file, control+Z does not revert my changes.
Now, A javascript alert pops up asking: "Are you sure you want to save? The file will be overwritten."
I hypothesize that a redefinition of the alert function, locally via my javascript console could stop this behavior and thus reclaim my control+Z ability.
window.alert = function() {};
Well, this does successfully disable alerts when I throw it in the console. Is it incorrect methodology to paste this in the console? Is there something else I should do?
Here is a thread tracking this issue: https://forums.cpanel.net/threads/cpanel-40934-website-com-says-are-you-sure-you-want-to-save-the-file-will-be-overwritten.701853/
Alert box is used to provide the user some information. When trying to receive approval or disapproval, confirm() is used.
Try pasting this code in your web dev tools console.
window.confirm = function() {};