Javascript - Inject code into iframe containing 3rd party site
<p><strong>CONTEXT</strong></p>

<p>I am loading a third party website (e.g. google.com) into an iframe on my site. I would like to be able to apply my own script (e.g. jquery) to the page in order to change DOM elements, but obviously cannot due to CORS policy. I know that the solution to this is a reverse proxy but I haven't seen any simple versions or walkthroughs that explain how something like this is set up.</p>

<p><strong>QUESTION</strong></p>

<p>So far I've found the following two packages that try to solve this problem:</p>

<ol>
<li><a href="https://www.npmjs.com/package/corsproxy" rel="nofollow">https://www.npmjs.com/package/corsproxy</a></li>
<li><a href="https://www.npmjs.com/package/cors-anywhere" rel="nofollow">https://www.npmjs.com/package/cors-anywhere</a></li>
</ol>

<p>I'm not sure exactly what the simplest application of these would be to an iframe - is there an example/jsfiddle that shows this in action?</p>