Last active
August 29, 2015 14:17
-
-
Save NHQ/241d560df4cc4094d512 to your computer and use it in GitHub Desktop.
Every new tab / session at http://node.module.club a new diff record is created. to recover diffs paste something like this into the editor and compile [SHIFT-ENTER]:
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
| allDiffs = store.getAll() | |
| aDiffs = store.get('1427230082405_diffs') | |
| console.log(aDiffs, getDiffByIndex(aDiffs.length - 1)) | |
| function getDiffByIndex(index){ | |
| var str = ''; | |
| for(var x = 0; x < index; x++) { | |
| str = diff.applyPatch(str, aDiffs[x].diff) | |
| } | |
| return str | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment