0
0
mirror of https://github.com/marcrobledo/savegame-editors.git synced 2025-04-28 09:05:10 +00:00

fix chrome offline saving

This commit is contained in:
Marc Robledo 2020-07-19 09:04:37 +02:00
parent 1426613047
commit a1efafa087

View File

@ -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. 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 http://www.marcrobledo.com/license
*/ */
@ -134,7 +134,7 @@ function loadSavegameFromInput(input){
} }
function saveChanges(){ 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(); SavegameEditor.save();
tempFile.save(); tempFile.save();
}else{ }else{