Skip to content

scripting/outlineBrowser

Repository files navigation

outlineBrowser

JavaScript code to display JSON outlines.

What it does

It reads a JSON file that looks like this and renders it as an expandable outline, like this.

What is a JSON outline?

  1. It's a JSON object that contains a text value, any number of other scalar values, and an array named subs.

  2. Each object in subs conforms to rule 1.

Where this code is used

I use this code in two places:

  1. To render outlines for reading in liveblog.co. (Example)

  2. To render outlines in rivers, to view outlines included in news items. (Example)

Demo app

Here's a link to the demo app on my server so you can see what outlinebrowserdemo.html looks like.

Updates

v0.5.0 -- 9/22/17 by DW

Saving and restoring expansion state. Two new routines, getExpansionState and applyExpansionState. The demo has been updated to support the feature. Here's the writeup on Scripting News.

Dependencies

  1. jQuery

  2. Font Awesome

  3. Bootstrap Toolkit

About

JavaScript code to display JSON outlines.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published