title: My Greasemonkey script works when typed in the console, but not when I try to use it in Firefox
body: <p>I am having trouble running a simple GreaseMonkey script I made to clean up the search results on DuckDuckGo.com. The code below simply removes the "Images" and "Videos" buttons from the results. </p>
  
  <pre><code>// ==UserScript==
  // @name        Relevance
  // @include     http://duckduckgo.com/*
  // @include     https://duckduckgo.com/*
  // @version     1
  // @grant       none
  // ==/UserScript==
  
  function Relevant(){
      var killIt=["zcm__link  js-zci-link  js-zci-link--images  ", "zcm__link  js-zci-link  js-zci-link--videos  "];
      var el = document.getElementsByTagName("a");
      for (i = 0; i &lt; el.length; i++) 
          {
              for (j=0;j&lt;killIt.length; j++) 
                  {
                      if (el[i].className==killIt[j]) 
                          {
                              el[i].parentNode.removeChild(el[i]);
                          }
                  }
          }
  };
  
  
  $(window).load (Relevant());
  </code></pre>
  
  <p>The code works when typed in the console, but it doesn't work as a Greasemonkey script. I tried to adapt the solution found <a href="https://stackoverflow.com/questions/7539088/works-as-javascript-but-doesnt-work-as-a-greasemonkey-script">here</a> (i.e., use <code>$(window).load (Relevant());</code>), but I'm still having trouble. This is my first attempt at making my own user script, so any help is much appreciated.</p>