first commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// ═══════════════════════════════════════════════════════
|
||||
// Text Encoder / Decoder
|
||||
// ═══════════════════════════════════════════════════════
|
||||
async function encodeText(method) {
|
||||
const text = document.getElementById('textencInput').value;
|
||||
if (!text) return setStatus('textencStatus', 'error', 'Enter some text first.');
|
||||
const d = await apiPost('/api/text/encode', { text, method });
|
||||
if (d.success) {
|
||||
document.getElementById('textencOutput').value = d.result;
|
||||
setStatus('textencStatus', 'success', `Encoded with ${method} ✓`);
|
||||
} else setStatus('textencStatus', 'error', d.error);
|
||||
}
|
||||
|
||||
function swapTextEnc() {
|
||||
const input = document.getElementById('textencInput');
|
||||
const output = document.getElementById('textencOutput');
|
||||
const tmp = input.value;
|
||||
input.value = output.value;
|
||||
output.value = tmp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user