Last active
August 29, 2015 13:57
-
-
Save bassarisse/9491943 to your computer and use it in GitHub Desktop.
Song backup - abundant-music.com
This file contains 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
/** | |
* | |
* UPDATE 2014-07-19: No longer works :-( | |
* | |
* This code enables you to backup ALL the settings from your song on | |
* abundant-music.com. | |
* | |
* 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 | |
* | |
* IMPORTANT: | |
* You should run this script through the abundant-music Dropbox URL | |
* (to get it, open abundant-music.com and inspect the frame element). | |
* | |
* HOW TO USE IT: | |
* 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 | |
* | |
* WARNING: | |
* 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! | |
* | |
* NOTES: | |
* 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() { | |
var | |
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();"; | |
copy(loadScript); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment