doc: add automatic restore state
All checks were successful
/ mirror_to_github (push) Successful in 34s
/ test (push) Successful in 8s

This commit is contained in:
Leon van Kammen 2025-04-14 18:33:32 +02:00
parent 6cfeaefe01
commit 9d549454d6

View file

@ -44,6 +44,7 @@ if( typeof emulator != 'undefined' ){
localforage.getItem("state", async (err,stateBase64) => {
const askConfirm = () => {
if( window.localStorage.getItem("restorestate") == "true" ) return true
try{
const scene = document.querySelector('a-scene');
if( scene.is('ar-mode') ) scene.exitAR()