How to renable document.write after jQuery ajax has completed
<p>I have to grab a snippet of JS that has document.write in it - this causes the page to go blank once the document.write renders. I was able to work around this by redefining document.write and pass the response of the script to a function that I use to output the response from the getScript() jQuery function. I am having an issue however with other elements and scripts that load later in the page that my redefining is preventing to output on the page. How can I set document.write back to the default functionality after the jQuery getScript() has completed?</p>

<pre><code>$.getScript('somescript.com/script/', function(){
  //Prevent document.write normal behavior
  document.write = function(markup) {
  fullMarkup += markup;
  appendResponse(markup);
  }
 }  
});
</code></pre>
