Replies: 1 comment
-
|
If it's helpful to anyone; here is a userscript that does this in a slightly hacky way. // ==UserScript==
// @name Prevent Portainer Console Close
// @grant none
// @match http://portainer.example.com/**
// ==/UserScript==
window.onbeforeunload = () => document.querySelector('.terminal') ? true : undefined |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
When using the container console, I frequently press Ctrl+W, which closes the browser tab. I have this habit from frequently using it in my shell where it deletes a word from the prompt line.
Describe the solution you'd like
Add a
window.onbeforeunload = () => falsewhile the console is loaded to prevent accidental closes while using the console. There is no reason to prevent closing while theDescribe alternatives you've considered
There is no way to bind the keyboard shortcut on most browsers.
I wrote a bookmarklet, so I can manually disable closing the tab accidentally.
Additional context
Add any other context or screenshots about the feature request here.
Beta Was this translation helpful? Give feedback.
All reactions