4

So, I am am developing a Chrome Extension which means I am constantly accidentally closing Chrome:

And while you may not see it now, I've closed Chrome at least 8 times because of accidentally moving too fast and clicking the instead of the button for my extension. I mean the top of the button really is only 11 pixels away:

Now that you believe I'm not a psycho let me go through what I've tried.

  • Setting for it? Nope.
  • Another SU Question? YES! But wait, in the answer of the question it acknowledges that you can't stop Chrome from closing without warning when pressing the . Which is exactly my problem. (Yes, I know I can Ctrl + Shift + Tab to bring it back but really?)

How can I disable the , show a confirmation, or anything like that?


Side note 1: Bob made a good point in chat about how I could just move the icon to the left in front of the other extension icons. Yeah, that would work. But it's more of a workaround, and I'd still like an answer. Other devs might not have a bunch of extensions installed or have a good reason to be developing without other extensions that could cause conflict. In that case, there would be nothing to move behind of it.

Side note 2: Sort of unrelated but I've also closed Chrome when clicking in the past, so this question could help even non developers who are as sloppy as me.

Insane
  • 2,922

1 Answers1

3

You could start typing in this answer box? ;)

enter image description here

Just thinking outside (actually, inside) the box.

Or, if you wanted to do it with the focus on another tab, you could always open the console (F12) and paste something along the lines of:

window.onbeforeunload = function (e) {
    e = e || window.event;

    if (e) {
        e.returnValue = 'Are you sure?';
    }
};
Jonno
  • 21,643