Some people who are stupid idiot dumbasses like me work out of the browser. There's... A lot of ways this can go wrong. I have lost work multiple times due to my dumbassery. I would not have lost work so easily if there were a prompt that pauses the page for confirmation if you don't leave properly (through the official 'save chapter' option)
I really don't like to have a leaving prompt on an NSFW site. There would be another click you have to do if you have to leave fast. I would rather go with automatically saving the draft from time to time like it is done within the forum.
Not every person has chrome. I do agree with the leaving page idea. A simple script pop-up would work.
I will say that if users are writing on their phone its very easy to switch off of onlookers - pocket it. If using computer or tablet... That's a big screen. Prompt or no someone might see what you are up to. There could (and should) also be a setting to turn it off (or on). I don't think a prompt while actively writing on-site-in-browser is very dangerous, where losing creative work is a huge, huge heartache that may never be realized in the same way again.
I've also seen an add-on for Firefox but didn't test it yet. Other browsers may have similar add-ons as well. Well, I would still prefer an autosave function from the very recent suggestion. Maybe it would be even possible to use the CTRL+s shortcut.
I guess I'll post my reply in here since my own was marked as a dupe! Anyway, strong disagree with gene.sis, coming from the position of someone who develops web sites. Showing those dialogs is a web standard and an expected part of browser UX. Since this behavior is expected, people will only find out that they need an extension to provide the functionality after losing a draft. "People" includes myself, and those who responded to my thread, and the poster of this thread, and the poster of that other duped thread, and the people who responded there. That's a lot of lost work! Plus, to the concern of "needing to exit quickly," there are shortcuts on all platforms to advance the prompt and close the tab. It's typically just Ctrl/Cmd-W, Enter, as the close button is the focused element on the prompt for all major browsers and OS's. Those concerned with closing ASAP can simply press those two key sequences in quick succession. Choosing to remove 1 step from a 2-step process and thereby allowing people to lose in-progress work is casting the baby out with the bathwater in a big way IMO. Heck, if we're absolutely concerned with having a single hotkey escape hatch for users we can add that as an checkbox to the preferences, but it should be opt-in. Auto-saving would be a great upgrade as well, but that doesn't replace a prompt! If the user closes in between the auto saving periods, this prompt should still be shown. Plus, a prompt on exit is also much more easily implemented than any kind of auto-save feature (which still hasn't landed 3 years on from this thread!). You're typically looking at ~3-5 lines of Javascript using the beforeunload event: https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
I thought this site already has auto save for drafts. Just a month ago, I was writing a chapter and my internet connection lost(but somehow I didn't notice) so when I clicked on "save as draft". I got to see that fucking dinosaur that some people like to play with(I personally hate that bastard). I thought everything was lost but after fixing my internet, When I clicked on back button, I found everything was just as I had left it. I thought this was because of auto save. Can it have some other reason?
If anyone still looks at this, after losing and having to rewrite a chapter of content, I slapped together a Tampermonkey script to add this functionality. See below if interested. Code: // ==UserScript== // @name Chyoa Close Check // @namespace http://tampermonkey.net/ // @version 0.1 // @description Ask before leaving // @match https://chyoa.com/chapter/*/new // @match https://chyoa.com/chapter/*/edit // @grant none // ==/UserScript== (function() { 'use strict'; var hook = true; window.onbeforeunload = function () { if (hook) { return "Did you save your changes?" } } function unhook() { hook = false; } })();