From 2edccec23eda228247476c8cc5d3763e44182e11 Mon Sep 17 00:00:00 2001 From: Lursun Date: Sat, 17 Mar 2018 15:46:22 +0800 Subject: [PATCH] Update app.js Oops! Accidentally trigger refresh or bookmark. --- src/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app.js b/src/app.js index c27b787f52..d70d6075d2 100644 --- a/src/app.js +++ b/src/app.js @@ -227,6 +227,10 @@ 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?' + } function importExternal (url, cb) { handleImports.import(url,