Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 1.66 KB

README.md

File metadata and controls

37 lines (23 loc) · 1.66 KB

Sunburst from a DOM Tree

Each website has a DOM Tree.

dom demo

I thought it would be interesting to see a DOM tree as a sunburst diagram.

Examples

reddit google facebook YouTube Amazon Twitter

How to make your own snapshot?

Step 1. Copy the content of domburst.js.

Step 2. Open any website and open Google Chrome developer tools (how?)

Step 3. Paste content into the console, and press Enter. The chart should appear.

demo

Security Note

In the .gif above, Facebook warns you from copy-pasting content. That is a good advice to follow.

In this particular case, the script doesn't access your cookies, neither does it send your data anywhere.

If you are familiar with JavaScript, please feel free to verify this. The entire program is ~400 lines of code, and I hope should be straightforward to follow.