I'm trying to figure out if there is a way (using JavaScript, or jQuery) to go through an entire HTML file replacing all references to external files and replace all the references to files in other directories with the same named file, but without directory information.
For instance, in the HTML text:
scripts/script.js
gets replaced withscript.js
images/big.jpg
gets replaced withbig.jpg
css/style.css
gets replaced withstyle.css
etc.
I guess the references in the CSS files need changing too.