to add the code to hundreds of xdp's, you will probably have to manipulate the xml of the xdp and insert the following code programmatically in the xml
<event activity="docReady" ref="$host" name="event__docReady"><script contentType="application/x-javascript">if (xfa.host.name == "Acrobat") {this...