1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

fiddle: changed the internal key of the session/local storage to avoid conflicts with the pikchr fiddle app (which is derived from this one) when running from the same HTTP origin as an instance of that app in a dev environment.

FossilOrigin-Name: fd668da5ccf037c2ad8e61e381dd1eb398a8deab42a00593e551c30bd176890d
This commit is contained in:
stephan
2022-05-28 11:59:46 +00:00
parent e9ab04a446
commit 1a66ff359f
3 changed files with 10 additions and 9 deletions

View File

@ -192,7 +192,7 @@
/** Name of the stored copy of SqliteFiddle.config. */
const configStorageKey = 'fiddle-config';
const configStorageKey = 'sqlite3-fiddle-config';
/**
The SqliteFiddle object is intended to be the primary
@ -305,12 +305,13 @@
}
return this;
},
/** Stores this object's config in the browser's storage. */
storeConfig: function(){
storage.setJSON(configStorageKey,this.config);
}
};
if(1){ /* set up SF.config */
if(1){ /* Restore SF.config */
const storedConfig = storage.getJSON(configStorageKey);
if(storedConfig){
/* Copy all properties to SF.config which are currently in