prevent close forum and los changes

Discuss issues and requests related with the forum software
User avatar
SL5
Posts: 492
Joined: 12 May 2015, 02:10
GitHub: sl5net
Contact:

prevent close forum and los changes

12 Oct 2018, 06:02

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
User avatar
Nextron
Posts: 1318
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win7 x64 AHK: Unicode x32

Re: prevent close forum and los changes

12 Oct 2018, 08:05

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.
User avatar
SL5
Posts: 492
Joined: 12 May 2015, 02:10
GitHub: sl5net
Contact:

Re: prevent close forum and los changes

12 Oct 2018, 09:41

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."
User avatar
Nextron
Posts: 1318
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win7 x64 AHK: Unicode x32

Re: prevent close forum and los changes

12 Oct 2018, 10:06

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.
User avatar
SL5
Posts: 492
Joined: 12 May 2015, 02:10
GitHub: sl5net
Contact:

Re: prevent close forum and los changes

12 Oct 2018, 11:20

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));
User avatar
joedf
Posts: 6688
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: prevent close forum and los changes

12 Oct 2018, 11:23

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...
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500 @ 3.00 GHz, 16GB DDR4 3200 MHz, NVIDIA GTX 1060 6GB | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]

Return to “Forum Issues”

Who is online

Users browsing this forum: No registered users and 13 guests