Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 13:57
Show Gist options
  • Save bassarisse/9491943 to your computer and use it in GitHub Desktop.
Save bassarisse/9491943 to your computer and use it in GitHub Desktop.
Song backup -
* UPDATE 2014-07-19: No longer works :-(
* This code enables you to backup ALL the settings from your song on
* This tool (which is awesome, btw) already offers preset saving
* functionality, but I prefer to save everything related to a song
* at once, mostly for the trouble of maintaining several presets, but
* also because most of the time I won't reuse
* You should run this script through the abundant-music Dropbox URL
* (to get it, open and inspect the frame element).
* Execute it on Chrome's console and a script for reloading your
* current song will be put on your clipboard (it relies on the secret
* 'copy' function, I thing Firefox/Firebug supports it too). Use this
* generated on console again whenever you want
* This is NOT future proof! If the author decides to change the format
* the tool saves its settings, the scripts that this code generates may
* may not work anymore.
* Consider it a BIG UGLY HACK!
* You can opt to remove the key "RenderStorage" from the 'props' array,
* so your backups can become smaller, but you have to make sure you
* change some setting to force the song to be composed (just include
* a space on any field and erase it back).
(function() {
props = ["RenderStorage", "SongContentSeedSettings", "SongDetails", "SongDomains", "SongIndicesSeedSettings", "SongParameters", "SongSettings", "SongStructureSeedSettings", "WebAudioPlayerSettings"],
i = props.length, loadScript = "", db = window.localStorage;
while (i--) {
var prop = props[i];
loadScript += "window.localStorage.setItem('" + prop + "', '" + db.getItem(prop) + "');\n";
loadScript += "window.location.reload();";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment