Page 1 of 1

prevent close forum and los changes

Posted: 12 Oct 2018, 06:02
by SL5
today i losed lots typing here in the forum, becouse of

Chrome's obnoxious Ctrl-Shift-Q shortcut

i read a solution here
is_there_a_good_way_to_disable_ctrl_q_on_chrome

do you may please add this mechaniscm?
preventclosenodonations into the forum?

thanks

Re: prevent close forum and los changes

Posted: 12 Oct 2018, 08:05
by Nextron
Since I don't use Chrome, I had to look it up, that Ctrl-Shift-Q closes all tabs and windows. I hardly think the solution is to implement an annoying popup on every page. It doesn't take much more that a few lines of AHK code to implement an "Are you sure..." dialog, that works on every page without hindering other users.

Re: prevent close forum and los changes

Posted: 12 Oct 2018, 09:41
by SL5
Nextron wrote:Since I don't use Chrome, I had to look it up, that Ctrl-Shift-Q closes all tabs and windows. I hardly think the solution is to implement an annoying popup on every page. It doesn't take much more that a few lines of AHK code to implement an "Are you sure..." dialog, that works on every page without hindering other users.
sure thats i already did. thats was not the question.
sometimes ahk is off, becouse of some reasons (debugging or so)

i dont mean a popup.

i maan such a messag. "do you really wanna close this page."

Re: prevent close forum and los changes

Posted: 12 Oct 2018, 10:06
by Nextron
I dislike pages applying such measures; it's not the website's role to second guess/interfere with my actions outside of the page.
At any given time I have open various browser windows with maaany tabs. If I accidentally close a tab, I undo it. If I want to prevent that, I protect the tab. There is one website I have open sometimes in multiple tabs, and once I try to close the window, I get prevented to do so until on each of those tabs I confirm I'm certain I want to leave the page, which is non of the website's business.

Re: prevent close forum and los changes

Posted: 12 Oct 2018, 11:20
by SL5
I dislike pages applying such measures; it's not the website's role to second guess/interfere with my actions outside of the page.
sure, but it helps
At any given time I have open various browser windows with maaany tabs. If I accidentally close a tab, I undo it. If I want to prevent that, I protect the tab.
i am havy debugging some big ahk and have often close all ahks for some reason.
how you do it?

or may save the text into

https://stackoverflow.com/questions/201 ... calstorage
var testObject = { 'one': 1, 'two': 2, 'three': 3 };

// Put the object into storage
localStorage.setItem('testObject', JSON.stringify(testObject));

// Retrieve the object from storage
var retrievedObject = localStorage.getItem('testObject');

console.log('retrievedObject: ', JSON.parse(retrievedObject));

Re: prevent close forum and los changes

Posted: 12 Oct 2018, 11:23
by joedf
You could easily add a greasemonkey script, with something like...

Code: Select all

window.addEventListener("beforeunload", function (event) {
  if (true) //check for text len in reply box...
  {
    event.returnValue = true;
    return true;
  }
});
I dont think we want this as default behaviour as webbrowsers should refrain from affecting the user's control...