title: Greasemonkey script to remove parameters from youtube url's
body: <p>I dont know anything about writing scripts but...
  I want to remove the &amp;list= parameter from youtube links and/or the page where you watch the video, preferably both.
  So <a href="https://www.youtube.com/watch?v=_VIDEO_ID_&amp;list=_LIST_ID_" rel="nofollow">https://www.youtube.com/watch?v=_VIDEO_ID_&amp;list=_LIST_ID_</a> would become:<a href="https://www.youtube.com/watch?v=_VIDEO_ID_" rel="nofollow">https://www.youtube.com/watch?v=_VIDEO_ID_</a>.
  You can do this in the address bar and it gets rid of the annoying "uploads from _USER_NAME_" play list, but a script would be faster and easier.
  US
  I have researched around the web and found example scripts to change parameters but not delete them, and my attempts to alter them to my purposes have all failed.</p>
  
  <p>Here is my latest attempt:</p>
  
  <pre><code>if(window.location.pathname.match(example.com))
  {
  var url1=url+.split("&amp;", 1);
  window.location.replace(url1);
  }
  else
  {
  var theurl = document.URL;
  var links,thisLink;
  links = document.evaluate("//a[@href]",
  document,
  null,
  XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
  null);
  for (var i=0;i&lt;links.snapshotLength;i++) {
  thisLink = links.snapshotItem(i);
  if(thisLink.match(thisLink)
     theurl=thislink.split("&amp;", 1);
     thislink=theurl;
  }
  }
  </code></pre>
  
  <p>(I had to hand indent so there may be errors)</p>
  
  <p>Or if I am in completely the wrong place any help would be appreciated, like where would be the correct place to post this question etc... I am just trying to find an answer to my problem.</p>