Last active
May 31, 2021 05:09
-
-
Save dclamage/ffc19b8c6b7046259404f4b8b76f5977 to your computer and use it in GitHub Desktop.
Removes the confirmation dialog when closing the tab.
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 Fpuzzles-noconfirm | |
// @namespace http://tampermonkey.net/ | |
// @version 1.1 | |
// @description Removes the confirmation dialogue when closing tab. | |
// @author Rangsk | |
// @match https://*.f-puzzles.com/* | |
// @match https://f-puzzles.com/* | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
window.addEventListener('beforeunload', function(event) { | |
event.stopImmediatePropagation(); | |
}, true); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment