This is a script you can put into Tampermonkey or Greasemonkey to get a tree view of a DOM tree. It uses D3 (version 3.4) to generate the tree. You can start the DOM tree from any element in the DOM tree.
It inserts a popup block and inserts the generated DOM tree visualization. You can close this popup to go back to the website.
You can close branches and expand branches by clicking on the node.
Put dom-tree-visualizer.js into Tampermonkey or Greasemonkey. In the console type in:
DOMTreeVisualize("footer")
To show the DOM tree branch of footer. You can choose any part of the DOM tree as the parent.