Skip to content
Snippets Groups Projects
Commit d088adbc authored by majou's avatar majou
Browse files

remove save to file restrictions on mobile

parent c89f7010
No related branches found
No related tags found
1 merge request!2187Compat fixes for old mobiles
:: Saves Export/Import Overlay [widget] :: Saves Export/Import Overlay [widget]
<<widget "optionsExportImport">> <<widget "optionsExportImport">>
<<if SugarCube.Browser.isMobile.any() is true>> <<if SugarCube.Browser.isMobile.Android is true>>
Note that saving and loading from file does not work on Android currently. <span class="red">Note that saving and loading from file may not work on Android devices in all environments.</span>
<<else>> <</if>>
<<set $_errorCount to document.querySelectorAll('.error').length>> <<set $_errorCount to document.querySelectorAll('.error').length>>
<<set $_dolErrorCount to document.querySelectorAll('.dol-error').length>> <<set $_dolErrorCount to document.querySelectorAll('.dol-error').length>>
<<set $_customErrorCount to Errors.log.length>> <<set $_customErrorCount to Errors.log.length>>
<<set $_bypassRestrictions to $debug is 1 or $_errorCount gt 0 or $_dolErrorCount gt 0 or $_customErrorCount gt 0>> <<set $_bypassRestrictions to $debug is 1 or $_errorCount gt 0 or $_dolErrorCount gt 0 or $_customErrorCount gt 0>>
Load from file: <input id="saveImport" type="file" value="Load from file" onchange="importSave(this.files)"> Load from file: <input id="saveImport" type="file" value="Load from file" onchange="importSave(this.files)">
<br><br> <br><br>
<<if tags().includes("nosave")>> <<if tags().includes("nosave")>>
You can't export your current save here! You can't export your current save here!
<<elseif $ironmanmode>> <<elseif $ironmanmode>>
<<if $_bypassRestrictions>> <<if $_bypassRestrictions>>
<input type="button" class="saveMenuButton" value="Save to file" onclick="IronMan.exportCurrent()"> <input type="button" class="saveMenuButton" value="Save to file" onclick="IronMan.exportCurrent()">
<<else>>
Unable to save to file during ironman-mode. Only autosaves can be exported.
<</if>>
<<elseif ($replayScene is undefined) or $_bypassRestrictions>>
<<set _exportName to "'degrees-of-lewdity"+($saveName isnot ''?'-'+$saveName:'')+ "'">>
<input type="button" class="saveMenuButton" value="Save to file" @onclick="'updateExportDay();SugarCube.Save.export('+_exportName+')'">
<<else>> <<else>>
Unable to save to file currently. Unable to save to file during ironman-mode. Only autosaves can be exported.
<</if>> <</if>>
<<elseif ($replayScene is undefined) or $_bypassRestrictions>>
<<set _exportName to "'degrees-of-lewdity"+($saveName isnot ''?'-'+$saveName:'')+ "'">>
<input type="button" class="saveMenuButton" value="Save to file" @onclick="'updateExportDay();SugarCube.Save.export('+_exportName+')'">
<<else>>
Unable to save to file currently.
<</if>> <</if>>
<br><br> <br><br>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment