title: Making a Chrome extension to replace a single image
body: <p>sorry if this has already been asked - I looked extensively, but can't find anything that seems to address it. Though it's quite possible it's been asked a dozen times already and the language used just went completely over my head. Which brings me to this: I'm not technologically stupid or anything, but as far as coding anything goes, that's another story entirely and I know virtually zero terminology regarding Chrome extensions. I just started googling about an hour ago.</p>
  
  <p>Anyway, the question. I'm trying to make an extension to replace a single gif on a website I frequent. It's a loading image, so it appears on virtually every page, and it's just atrocious. The image is called (is that the right word?) by a script...rocket-script, I think it's called, which refers to it as ajax_loader, from browsing the page source? And the CSS stylesheet gave me the URL for the image.</p>
  
  <p>So, here is the code I have, based on googling:</p>
  
  <p><B>manifest.json</B></p>
  
  <pre><code>{
      "manifest_version": 2,
      "version": "1.0",
      "name": "extensioname",
      "description": "extensiondescription",
      "content_scripts": [
          {
              "matches": ["websiteitselfurl.com*","URLofimagetobeblocked.gif"],
              "js": ["part2.js"]
          }
      ]
  }
  </code></pre>
  
  <p>And then there's</p>
  
  <p><B>part2.js</B></p>
  
  <pre><code>document.images[0].src = "replacementimage.gif";
  document.images[0].height = "300";
  document.images[0].width  = "300";
  </code></pre>
  
  <p>Obviously those aren't the actual URLs, but...
  All this ends up doing is replacing an image on every webpage, regardless of where it is, with the replacement gif. And not even the loading image in question on the site I am trying to replace in the first place.
  I've tried changing the values in the "matches" line to a few different things, including  at the end as in the example I found, and...that's literally all I can think to do.
  I'd like to reiterate that I'm a complete know-nothing moron about this, so I apologize if it's already been asked, but I really cannot find an answer anywhere, and for the life of me I cannot get this to work myself and I'm out of ideas at this point. I registered here just to ask because I'm like ripping my hair out over it.</p>
  
  <p>Any guidance whatsoever would be tremendously appreciated. Thank you!</p>