Skip to content

Instantly share code, notes, and snippets.

@Lexikos
Created January 23, 2015 08:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lexikos/5f8e1402943642ff98c7 to your computer and use it in GitHub Desktop.
Save Lexikos/5f8e1402943642ff98c7 to your computer and use it in GitHub Desktop.
HTA for converting the `toc` data in toc.js to pure JSON. Requires IE8+.
<!DOCTYPE html>
<meta http-equiv="X-UA-Compatible" content="IE=8">
<script src="toc.js"></script>
<script>
var fso = new ActiveXObject("Scripting.FileSystemObject")
var f = fso.OpenTextFile("toc.json", 2, true)
f.Write(JSON.stringify(toc))
f.Close()
window.close()
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment