I have following script tag where a function A() does a document.write(). I don't have access to A() since it's from third part script.
//block1
<script type="text/javascript">
A();
</script>
I don't have any id/class hook to block1 but I can introduce a function call before A() like this.
<script type="text/javascript">
B();
A();
</script>
I want B() function to replace block1 to
<script type="text/javascript">
C();
</script>
// or keep as is
<script type="text/javascript">
A();
</script>
Is this possible and how should I go about it?