79633728

Date: 2025-05-22 12:31:44
Score: 1
Natty:
Report link

Works on Chrome, if the idea is to prevent the reload/refresh:

window.addEventListener('beforeunload', function(e) {
   e.preventDefault();
   e.returnValue = ''; // For Chrome
   return '';
});
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Pedro Lira