prevent close forum and los changes

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: prevent close forum and los changes

Re: prevent close forum and los changes

Post by joedf » 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...

Re: prevent close forum and los changes

Post by SL5 » 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));

Re: prevent close forum and los changes

Post by Nextron » 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.

Re: prevent close forum and los changes

Post by SL5 » 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."

Re: prevent close forum and los changes

Post by Nextron » 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.

prevent close forum and los changes

Post by SL5 » 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

Top