I am doing some contract work in which I need to write small Javascript fragments for client sites, and then make sure that they work in all browsers.
I do not have access to site servers, so I need to be able to enter fragments in another way.
I tried to write a proxy script in PHP that captures the source code of the site, absolutes all URLs, and then implements Javascript and works on some client sites (and has the advantage of being easy to test in multiple browsers).
But some Javascript-heavy sites do not work with this approach - they will do things like testing window.location to make sure it is not tampered with, or they will include links to files on the local server that the proxy script cannot filter.
Alternatively, I suppose I could use Greasemonkey to insert Javascript ... which would allow me to see what the code looks like in Firefox, but then how can I check, say, in IE6?
Can anyone suggest a way to develop a cross-browser Javascript if you do not have access to the site that will eventually host Javascript?
source share