From a1efafa0875e0d1b50c61f861ab2789e7244ebc9 Mon Sep 17 00:00:00 2001 From: Marc Robledo Date: Sun, 19 Jul 2020 09:04:37 +0200 Subject: [PATCH] fix chrome offline saving --- savegame-editor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/savegame-editor.js b/savegame-editor.js index cffdf6b..d721f41 100644 --- a/savegame-editor.js +++ b/savegame-editor.js @@ -1,8 +1,8 @@ /* - savegame-editor.js v20190411 + savegame-editor.js v20200719 A library that lets you create easily a savegame editor. Made with vanilla JS. - by Marc Robledo 2016-2019 + by Marc Robledo 2016-2020 http://www.marcrobledo.com/license */ @@ -134,7 +134,7 @@ function loadSavegameFromInput(input){ } function saveChanges(){ - if(decodeURIComponent(document.cookie).indexOf('hideWarningMessage=1')>=0){ + if(decodeURIComponent(document.cookie).indexOf('hideWarningMessage=1')>=0 || location.protocol==='file:'){ /* chrome does not write cookies in local, so skip warning message in that case */ SavegameEditor.save(); tempFile.save(); }else{