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:
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);
but it's not working. Can you help me, or just tell me a way to edit JS files on specific page..