mirror of
https://github.com/paradoxxxzero/butterfly.git
synced 2026-05-26 07:08:08 +00:00
Fix force close with warning
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
__version__ = '2.0.7'
|
||||
__version__ = '2.0.8'
|
||||
|
||||
|
||||
import os
|
||||
|
||||
2
butterfly/static/ext.min.js
vendored
2
butterfly/static/ext.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -73,12 +73,12 @@
|
||||
setTimeout(function() {
|
||||
term.write('Closed');
|
||||
term.skipNextKey = true;
|
||||
return term.body.classList.add('dead');
|
||||
}, 1);
|
||||
quit = true;
|
||||
term.body.classList.add('dead');
|
||||
if ((new Date()).getTime() - openTs > 60 * 1000) {
|
||||
return open('', '_self').close();
|
||||
}
|
||||
}, 1);
|
||||
return quit = true;
|
||||
});
|
||||
addEventListener('beforeunload', function() {
|
||||
if (!quit) {
|
||||
|
||||
4
butterfly/static/main.min.js
vendored
4
butterfly/static/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -79,11 +79,11 @@ document.addEventListener 'DOMContentLoaded', ->
|
||||
# Allow quick reload
|
||||
term.skipNextKey = true
|
||||
term.body.classList.add('dead')
|
||||
, 1
|
||||
quit = true
|
||||
# Don't autoclose if websocket didn't last 1 minute
|
||||
if (new Date()).getTime() - openTs > 60 * 1000
|
||||
open('','_self').close()
|
||||
, 1
|
||||
quit = true
|
||||
|
||||
addEventListener 'beforeunload', ->
|
||||
if not quit
|
||||
|
||||
Reference in New Issue
Block a user