title: Chrome Extension Doesn't Work After Scrolling
body: <p>I have a question regarding a Chrome extension which I am making. I tried creating a similar extension to this which would replace all images on the website with cat images:</p>
  
  <p><a href="https://blog.lateral.io/2016/04/create-chrome-extension-modify-websites-html-css/" rel="nofollow noreferrer">https://blog.lateral.io/2016/04/create-chrome-extension-modify-websites-html-css/</a></p>
  
  <p>I tried it on Facebook.</p>
  
  <p>The code is very simple:</p>
  
  <pre><code>var images = document.getElementsByTagName('img');
  for (var i = 0, l = images.length; i &lt; l; i++) {
    images[i].src = 'http://placekitten.com/' + images[i].width + '/' + images[i].height;
  }
  </code></pre>
  
  <p>The issue I have is that it only works with the images that first appear on Facebook and after scrolling for a bit it stops replacing images. Also, when scrolling back up the images that were initially replaced are now back to original. </p>
  
  <p>Is there any way I could fix this so the extension works throughout the whole site even when new images load after scrolling down?
  Thank you!</p>