- type: ask
param: url
message: 'Please provide URL:'
options: null
default: ''
vision:
enabled: false
mode: area
hint: ''
send: true
label: INPUT URL
optionsInvalid: false
- type: js
args: url
code: |-
function encodeDecodeURL(url) {
function fullyEncode(str) {
return str.split('').map(char =>
'%' + char.charCodeAt(0).toString(16).toUpperCase()
).join('');
}
function partiallyEncode(str) {
const protocol = str.match(/^(https?:\/\/)/)?.[1] || '';
const rest = str.slice(protocol.length);
return protocol + rest.split('').map(char =>
char === '/' || char === ':' ? char :
'%' + char.charCodeAt(0).toString(16).toUpperCase()
).join('');
}
function universalDecode(str) {
try {
return decodeURIComponent(str.replace(/%([0-9A-F]{2})/gi,
(_, hex) => String.fromCharCode(parseInt(hex, 16))));
} catch {
return str;
}
}
const fully = fullyEncode(url);
const partially = partiallyEncode(url);
const minimally = encodeURI(url);
return {
encoded: {
header: "=== ENCODED VERSIONS ===",
fully: fully,
partially: partially,
minimally: minimally
},
decoded: {
header: "=== DECODED VERSIONS ===",
fully: universalDecode(fully),
partially: universalDecode(partially),
minimally: universalDecode(minimally)
}
};
}
return encodeDecodeURL(args.url);
param: resultURL
timeout: 15000
onFailure: ''
silent: true
label: ENCODE / DECODE URL
- type: say
message: |-
**Encoded / Decoded version:**
- Fully encoded URL:
```
{{resultURL.encoded.fully}}
```
- Partially encoded URL (retains protocol and slashes):
```
{{resultURL.encoded.partially}}
```
- Minimum encoded URL (special characters only):
```
{{resultURL.encoded.minimally}}
```
- Fully decoded URL:
```
{{resultURL.decoded.fully}}
```
label: DISPLAY RESULT
- type: jump
to: INPUT URL
This automation command is created by a community member. HARPA AI team does not audit community commands.
Please review the command carefully and only install if you trust the creator.
All rights reserved ยฉ HARPA AI TECHNOLOGIES LLC, 2021 โ 2025
Designed and engineered in Finland ๐ซ๐ฎ