don\'t stop closing if not electron

pull/3094/head
yann300 5 years ago
parent 351df2892a
commit 9aae0faef7
  1. 5
      package.json
  2. 9
      src/app.js

@ -36,6 +36,7 @@
"fast-async": "^7.0.6",
"fast-levenshtein": "^2.0.6",
"gists": "^1.0.1",
"is-electron": "^2.2.0",
"javascript-serialize": "^1.6.1",
"jquery": "^3.3.1",
"js-base64": "^2.1.9",
@ -58,6 +59,7 @@
"request": "^2.83.0",
"rimraf": "^2.6.1",
"selenium-standalone": "^6.0.1",
"semver": "^6.1.2",
"solc": "^0.5.0",
"standard": "^8.5.0",
"swarmgw": "^0.3.1",
@ -68,8 +70,7 @@
"web3": "1.0.0-beta.27",
"webworkify": "^1.2.1",
"yo-yo": "^1.2.2",
"yo-yoify": "^3.7.3",
"semver": "^6.1.2"
"yo-yoify": "^3.7.3"
},
"dependencies": {
"http-server": "^0.11.1",

@ -1,6 +1,7 @@
/* global localStorage */
'use strict'
var isElectron = require('is-electron')
var $ = require('jquery')
var csjs = require('csjs-inject')
var yo = require('yo-yo')
@ -259,9 +260,11 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
if (window.location.protocol.indexOf('https') === 0) {
toolTip('You are using an `https` connection. Please switch to `http` if you are using Remix against an `http Web3 provider` or allow Mixed Content in your browser.')
}
// Oops! Accidentally trigger refresh or bookmark.
window.onbeforeunload = function () {
return 'Are you sure you want to leave?'
if (!isElectron()) {
// Oops! Accidentally trigger refresh or bookmark.
window.onbeforeunload = function () {
return 'Are you sure you want to leave?'
}
}
let appStore = new EntityStore('module', 'name')

Loading…
Cancel
Save