reordered plugins: first list encodings, then decodings
This commit is contained in:
		
							parent
							
								
									feb7939488
								
							
						
					
					
						commit
						7d2cdac227
					
				
					 1 changed files with 38 additions and 38 deletions
				
			
		
							
								
								
									
										76
									
								
								dencode.js
									
										
									
									
									
								
							
							
						
						
									
										76
									
								
								dencode.js
									
										
									
									
									
								
							|  | @ -12,7 +12,7 @@ | |||
| 		}, | ||||
| 		{ | ||||
| 			"id": "base64encode", | ||||
| 			"name": "Base64 encode", | ||||
| 			"name": "Encode Base64", | ||||
| 			"convert": function (input) { | ||||
| 				return { | ||||
| 					"status": "OK", | ||||
|  | @ -20,9 +20,45 @@ | |||
| 				}; | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "encodeuri", | ||||
| 			"name": "Encode URI", | ||||
| 			"convert": function (input) { | ||||
| 				return { | ||||
| 					"status": "OK", | ||||
| 					"content": encodeURI(input).replace(/%5B/g, '[').replace(/%5D/g, ']') | ||||
| 				}; | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "encodeuricomponent", | ||||
| 			"name": "Encode URI component", | ||||
| 			"convert": function (input) { | ||||
| 				return { | ||||
| 					"status": "OK", | ||||
| 					"content": encodeURIComponent(input).replace(/[!'()*]/g, function(c) { | ||||
| 							return '%' + c.charCodeAt(0).toString(16); | ||||
| 						}) | ||||
| 				}; | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "encodehtmlentities", | ||||
| 			"name": "Encode HTML entities", | ||||
| 			"convert": function (input) { | ||||
| 				return { | ||||
| 					"status": "OK", | ||||
| 					"content": input | ||||
| 						.replace(/\&/g, "&") | ||||
| 						.replace(/\</g, "<") | ||||
| 						.replace(/\>/g, ">") | ||||
| 						.replace(/\"/g, """) | ||||
| 				}; | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "base64decode", | ||||
| 			"name": "Base64 decode", | ||||
| 			"name": "Decode Base64", | ||||
| 			"convert": function (input) { | ||||
| 				try { | ||||
| 					return { | ||||
|  | @ -37,16 +73,6 @@ | |||
| 				} | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "encodeuri", | ||||
| 			"name": "Encode URI", | ||||
| 			"convert": function (input) { | ||||
| 				return { | ||||
| 					"status": "OK", | ||||
| 					"content": encodeURI(input).replace(/%5B/g, '[').replace(/%5D/g, ']') | ||||
| 				}; | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "decodeuri", | ||||
| 			"name": "Decode URI", | ||||
|  | @ -64,18 +90,6 @@ | |||
| 				} | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "encodeuricomponent", | ||||
| 			"name": "Encode URI component", | ||||
| 			"convert": function (input) { | ||||
| 				return { | ||||
| 					"status": "OK", | ||||
| 					"content": encodeURIComponent(input).replace(/[!'()*]/g, function(c) { | ||||
| 							return '%' + c.charCodeAt(0).toString(16); | ||||
| 						}) | ||||
| 				}; | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "decodeuricomponent", | ||||
| 			"name": "Decode URI component", | ||||
|  | @ -93,20 +107,6 @@ | |||
| 				} | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "encodehtmlentities", | ||||
| 			"name": "Encode HTML entities", | ||||
| 			"convert": function (input) { | ||||
| 				return { | ||||
| 					"status": "OK", | ||||
| 					"content": input | ||||
| 						.replace(/\&/g, "&") | ||||
| 						.replace(/\</g, "<") | ||||
| 						.replace(/\>/g, ">") | ||||
| 						.replace(/\"/g, """) | ||||
| 				}; | ||||
| 			} | ||||
| 		}, | ||||
| 		{ | ||||
| 			"id": "decodehtmlentities", | ||||
| 			"name": "Decode HTML entities", | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue