Skip to content

Instantly share code, notes, and snippets.

@maykbrito
Created March 23, 2022 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maykbrito/f669e39239a27300c6d2b18acedffa5b to your computer and use it in GitHub Desktop.
Save maykbrito/f669e39239a27300c6d2b18acedffa5b to your computer and use it in GitHub Desktop.
export and import content of some fronteditor.dev project
/* this is for fronteditor.dev to export from some browser and import to another
1. Run this in the console of the browser where you and to copy the Fronteditor's content
2. Paste the results in the browser where you want to add that Fronteditor's content
*/
let itemName = 'fronteditor:' + location.pathname.replace('/', '');
let contentFromLocalstorage = JSON.stringify(localStorage.getItem(itemName))
copy(`localStorage.setItem('${itemName}', ${contentFromLocalstorage})`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment