Created
March 29, 2015 08:07
-
-
Save LucasMetal/438ff2336e417cff5b52 to your computer and use it in GitHub Desktop.
Greasemonkey script that prevents WhatsApp web from asking for confirmation before closing the page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name WhatsApp Web Unload Handler remover | |
// @namespace LucasMetal | |
// @description Prevents WhatsApp web from asking for confirmation before closing the page. | |
// @include https://web.whatsapp.com/ | |
// @version 1 | |
// @grant none | |
// @author @LucasMetal | |
// ==/UserScript== | |
setTimeout(function(){ | |
window.onbeforeunload = null; | |
window.onunload = null; | |
}, 5000); // 5 seconds timeOut is simple and enough;) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Less comments and more lines of code pls :P