title: Greasemonkey - replace javascript src to load custom JS instead the one of the page
body: <p>There's specific webpage with variable in .js file. I want to rewrite the URL to be loaded with Greasemonkey, but still haven't got any results.The code I use is:</p>
  
  <pre><code>window.addEventListener(
      'load', 
      function() { 
          allTextareas = document.getElementsByTagName('script');
          for (thisTextarea in allTextareas) {
              if( allTextareas[thisTextarea].getAttribute('src') == 'some url.js' ){
                   //allTextareas[thisTextarea].setAttribute('src', 'http://my custom url.js');   
  
  
              }
          }
  
       },
      true);
  </code></pre>
  
  <p>but it's not working. Can you help me, or just tell me a way to edit JS files on specific page.. </p>