Skip to content

wirebits/Refresh-Blocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Refresh-Blocker

JS Code to stop reload webpages.

Key Features

  • Block Reload Button of the browser.
  • Block Ctrl + R shortcut key.
  • Block F5 key.

How To

  1. Open any browser.
  2. Open any web page.
  3. Open Developer Options by pressing Ctrl + Shift + I.
  4. Click on Console tab.
  5. Paste the following code snippet :
window.addEventListener('keydown', function (event) {
    if ((event.key === 'F5') || (event.ctrlKey && event.key === 'r') || (event.metaKey && event.key === 'r')) {
        event.preventDefault();
    }
});

setInterval(function() {
    window.location.reload();
    window.stop();
}, 1000);
  1. Click Enter Key.
  2. Close the Developer Options.
  • Now when click on reload button on browser then it is disabled.

About

JS Code to stop reload webpages.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published