Last active
July 8, 2019 22:28
-
-
Save philiprenich/a0eb7553813934edb7164ad853634c4d to your computer and use it in GitHub Desktop.
Export bookmarklet to export kobold.club encounters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript: var defaultEmail=""; var email=window.prompt("Email to send data to:", defaultEmail);var lib=JSON.stringify(localStorage.getItem('5em-library')); var party=JSON.stringify(localStorage.getItem('5em-party-info')); var players=JSON.stringify(localStorage.getItem('5em-players')); var body = "http://kobold.club/\n\nlocalStorage.setItem('5em-library', "+lib+");localStorage.setItem('5em-party-info', "+party+");localStorage.setItem('5em-players', "+players+");"; var link=document.createElement('a');link.setAttribute('href',"mailto:"+email+"?subject=Kobold%20Club%20export&body="+encodeURIComponent(body));var body=document.querySelector("body");body.appendChild(link);link.click(); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instructions
I'm going to assume you know a little bit about Javascript and web development for this.
Warning: This will overwrite any data stored with Kobold.club on the new browser
Usage
defaultEmailwith your preferred email for quicker usage. Alternatively, setemailto your email and remove thewindow.promptfunction all together so your email client just launches immediately.