Galadriel's Mirror JS
A tiny script which can display the content of
<script> tags on a page.
<pre class="galadriel-mirror"></pre> <script> var foo = "bar"; </script>
var foo = "bar";;
Take a look at
example.html in this repo to see her in action!
How it works
Galadriel's Mirror finds all tags with the class
galadriel-mirror. These are now "mirror" elements. Galadriel will then search down the DOM tree for the first
<script> tag she finds and display its contents in the mirror.
Please note that Galadriel will look for siblings and parents (and siblings of parents), but she will not dive into nodes of the DOM tree. So she may not work with complicated page layouts.