Youtube bot in Javascript
<p>OK, so I have some Javascript code, but the thing is, I don't know if it works or not. The Javascript code is supposed to :</p>

<ul>
<li>remove the ".mp4" extension from every title</li>
<li>change my video category</li>
<li>put the same description in all of the videos</li>
<li>put the same keywords in all of the videos</li>
</ul>

<p>So, that Javascript code should be run on the Youtube upload page. You log in, select videos to upload and you get to your upload page. So, could someone test this script out for me (I am not familiar with testing the script)?</p>

<p>Code :</p>

<pre><code>var i = prompt("How many videos have you got?", "");
function remove_mp4()
{
   titleElems=document.getElementsByName("title");
   for(i=0;i&lt;titleElems.length;i++)
   {
       titleInner=titleElems[i].innerHTML;
       titleElems[i].innerHTML=titleInner.replace(titleInner.match(".mp4"), "");
   }
}
for (var x = 0; x &lt; i; i++)
{
    document.getElementsByName("description")[x].value = "Visit me on my web-site :\
    \
                                                          http://www.sample.com/";
     document.getElementsByName("keywords")[x].value = prompt("Enter your keywords : ","");
    catChildNodes=document.getElementsByName("category")[x].childNodes;
    catChildNotes[x + 1].removeAttribute("selected");
    for(y=0;y&lt;catChildNodes.length;y++)
    {
       if(catChildNodes[y].value="27") 
       {
          catChildNodes[y].setAttribute("selected",""); 
       }
   }
}
remove_mp4();
</code></pre>

<p>Also, there is one thing I notice and that is that my URL from "//" these //www.sample.com/ is considered as an comment (it is colored green in Notepad++).</p>

<p>So, could someone fix the comment bug and test the script to see if it works (on Youtube upload page)?</p>

<p>Thanks in advance!</p>
