/**
 * @param variables {String|Object}
 */
function URLVariables(variables){
	if(!(this instanceof URLVariables)){
		return new URLVariables(variables)
	}
	switch(typeof variables){
		case "string":
			this.decode(variables)
			break
		case "object":
			for(var i in variables){
				this[i] = variables[i];
			}
			break
	}
}
/**
 *
 */
URLVariables.prototype.decode = function(source){
	if(typeof source != "string")
		return this

	var url = source.split("?");
	var urlvar = url[url.length-1].split("&");
	for(var i in urlvar){
		var data = urlvar[i].split("=")
		this[decodeURIComponent(data[0])] = decodeURIComponent(data[1]);
	}
	return this
}
URLVariables.prototype.toString = function(){
	var urlvar_keys = []
	for(var i in this){
		if(typeof this[i] != "function")
			urlvar_keys.push(i)
	}
	urlvar_keys.sort()

	var l = []
	for(i in urlvar_keys){
		l.push(encodeURIComponent(urlvar_keys[i]) + "=" + encodeURIComponent(this[urlvar_keys[i]]))
	}
	return l.join("&")
}
@@ -1,12 +1,100 @@
 /**%0A
+ * @author Tzuyang Tsai (shiyou0130011)%0A * @license Apache-2.0%0A */%0A%0A/**%0A * @constructor%0A
  * @para
@@ -120,16 +120,43 @@
 %7CObject%7D
+ An url string or an object
 %0A */%0Afun
@@ -441,16 +441,109 @@
 %7D%0A/**%0A *
+ Converts the url string to the specified URLVariables object.%0A * @return %7BURLVariables%7D%09this
 %0A */%0AURL
@@ -849,17 +849,145 @@
 rn this%0A
-
 %7D
+%0A%0A/**%0A * @return The string containing all variables, in the MIME content encoding %3Ci%3Eapplication/x-www-form-urlencoded%3C/i%3E.%0A */
 %0AURLVari

update jsdoc