I have a question! I'm not sure if this is possible, but...
I have on a page a javascript include file. At the top of the file is a comment, looks something along the lines of this:
/*
Local site config.js
Last updated: 2012.01.04
*/
What I would like to be able to do is within another javascript file (this file gets loaded after the first file), somehow get that date. So my question is, are comments somehow stored within the DOM, or is there some other way to access the contents of this file in a way that I could just use regex to scrape for it, etc..?
Basically I have a global file that depends on local files for some config options, and there are a ton of sites that have their own local config file. I would like to be able to grab that date from the local .js file within the global file. Both local and global .js files are hosted on the same domain, but the sites that include the .js files may or may not be on the same domain as the .js files.
I know the right answer is to update all the local .js files to put that date in a .js variable, and as a long term solution, I certainly intend on doing that. But as a short term solution the only thing I can change right now is the global .js file. If it can't be done then it can't be done, but I wanted to explore my options and so far I can't think of any way to get that date...Soo... anybody have any ideas?