youtube-video-download.user.js
// URI(uri) - Convert a URI to a mutable object
Convert a URI to a mutable object
Convert a URI to a mutable object
function URI(uri)
{
 if (!(this instanceof URI))
  return new URI(uri);
 var m = uri.match(/([^\/]+)\/\/([^\/]+)([^?]*)(?:\?(.+))?/);
 if (m)
 {
  this.protocol = m[1];
  this.host = m[2];
  this.pathname = m[3];
  this.query = m[4] ? decodeQuery(m[4]) : {};
 }
 else
 {
  this.href = uri;
  this.query = {};
 }
}
function URI ( uri ) { if ( ! ( this instanceof URI ) ) return new URI ( uri ) ; var m = uri . match ( / ([^\/]+)\/\/([^\/]+)([^?]*)(?:\?(.+))? / ) ; if ( m ) { this . protocol = m [ 1 ] ; this . host = m [ 2 ] ; this . pathname = m [ 3 ] ; this . query = m [ 4 ] ? decodeQuery ( m [ 4 ] ) : { } ; } else { this . href = uri ; this . query = { } ; } }
URI(uri) - Convert a URI to a mutable object
URI ( uri ) - Convert a URI to a mutable object