I have a folder with many HTML documents, named 001.html to 999.html. In each document, there are the following lines:
<span class="my-name">Name X</span>
I want access to the content of this <span>, which I can get by opening the document in my browser and then entering the following in my addressbar:
javascript:document.getElementById('my-name').innerHTML;
Without altering the HTML documents, and without having to do it manually, how can I write a script which loads these HTML documents externally, applies the javascript above and returns the content of the <span>?