Skip to content

Instantly share code, notes, and snippets.

@markdon
Created February 6, 2019 23:40
Show Gist options
  • Save markdon/02e1540d5ef445f467a6e566500092ae to your computer and use it in GitHub Desktop.
Save markdon/02e1540d5ef445f467a6e566500092ae to your computer and use it in GitHub Desktop.
Download the currently open board as a .json file
fetch(`./node/${Boards.current.boardNode.id}`).then(response=>response.json()).then(boardData=> {
const element = document.createElement('a');
element.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(boardData)));
element.setAttribute('download', boardData.name);
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
});
@markdon
Copy link
Author

markdon commented Feb 6, 2019

Open the browser console (F12), paste in the above code and press enter to download a file containing all data for a board.

Does not run in IE11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment