title: jsDOM cannot change background color by class or tag
body: <p>I am trying to change the background Color of an element on another website with tamper monkey. However every time I try it sends the error: cannot change background-color of undefined.</p>
  
  <p>I have tried using getElementsByTagName and getElementsByClassName after which I use the style property then backgroundColor of course.</p>
  
  <pre><code>(function() {
      'use strict';
  
      var x = document.getElementsByClassName("rdw");
      x.style.backgroundColor = "red";
  
  })();
  </code></pre>
  
  <p>I would like to use getElementsByClassId because I feel in this scenario its more precise.</p>
  
  <p>As stated I get the error cannot change background color of undefined.</p>
  
  <p>I appreciate the help :)</p>