Created
September 10, 2023 16:16
-
-
Save tutacat/2f49752ff463320c1b80117d8604188d to your computer and use it in GitHub Desktop.
Userscript to prompt when closing ChatGPT tabs.
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 ChatGPT Confirm Close | |
// @namespace gptclose | |
// @match https://chat.openai.com/* | |
// @grant none | |
// @version 1.03 | |
// @author tutacat | |
// @license MPL | |
// @description 3/8/2023, 10:00:00 PM | |
// ==/UserScript== | |
// https://greasyfork.org/scripts/472739-chatgpt-confirm-close | |
window.addEventListener("beforeunload", (event) => { | |
//// Is a chat open? | |
//if (!window.location.pathname.startsWith("/c/") { | |
event.preventDefault(); | |
return false; | |
//} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment