Hi,
Is there any documentation you know of, explaining how one can save his work in tiddlywiki when the javascript scripts have been killed? Some kind of “Last resort” backup actions?
It just happened to me last week: after a few hours of work without saving my single-file tiddlywiki, I used the Advanced Search with a faulty regexp, and Firefox reacted with a notification along the lines of “a script on this page slows Firefox, [Stop] or [Wait] ?”.
Wait button had no effect, so I clicked on the Stop button, and I got doomed!
UI elements on the page were dead, I could not save the wiki, and I’d loose everything if I’d reload the page.
I eventually found a way to backup my work, but it was quite involved:
- used the Firefox console to explore the DOM
- found some docs on the objects hierarchy of TW on internet, esp. $tw.wiki
- didn’t find any simple way to trigger local file saving of the full TW
- used $tw.wiki.allTitles() to explore the tiddler store
- used $tw.wiki.getTiddlerText("$:/HistoryList") to list the last edited tiddlers
- used $tw.wiki.getTiddlerAsJson(“xxxxxxx”) to export each useful tiddler to json
- used Notepad++ to get rid of escape characters in Firefox’s json strings
- put resulting json in a file
- opened my last backup and imported json file
- saved the result
I spare you the trial-and-error process, all in all it took me nearly one hour.
Well, I do know many ways to prevent getting myself in this situation in the very first place, but I think that if it happened to me, it could happen to someone else.
So maybe we can discuss the easiest solution, and then document it on tiddlywiki.com?
Fred