From f8a2aa0e54687a30cbc5b4dd573dc0a72f01b61f Mon Sep 17 00:00:00 2001 From: EP Date: Wed, 20 Aug 2025 18:30:13 -0700 Subject: [PATCH] =?UTF-8?q?Transforms:=20add=20Ubbi=20Dubbi=20and=20R?= =?UTF-8?q?=C3=B6varspr=C3=A5ket=20(reversible);=20register=20in=20Format?= =?UTF-8?q?=20category?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/app.js | 2 +- js/transforms.js | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index be8e140..ec1c7a8 100644 --- a/js/app.js +++ b/js/app.js @@ -17,7 +17,7 @@ window.app = new Vue({ encoding: ['Base64', 'Base64 URL', 'Base32', 'Base45', 'Base58', 'Base62', 'Binary', 'Hexadecimal', 'ASCII85', 'URL Encode', 'HTML Entities'], cipher: ['Caesar Cipher', 'ROT13', 'ROT47', 'Morse Code', 'Atbash Cipher', 'ROT5', 'Vigenère Cipher', 'Rail Fence (3 Rails)', 'Rail Fence (5 Rails)', 'XOR Cipher (KEY)'], visual: ['Rainbow Text', 'Strikethrough', 'Underline', 'Reverse Text', 'Alternating Case', 'Reverse Words', 'Random Case', 'Swap Case', 'Title Case', 'Sentence Case', 'Emoji Speak'], - format: ['Pig Latin', 'Leetspeak', 'NATO Phonetic', 'camelCase', 'snake_case', 'kebab-case', 'Squash Whitespace'], + format: ['Pig Latin', 'Leetspeak', 'Ubbi Dubbi', 'Rövarspråket', 'NATO Phonetic', 'camelCase', 'snake_case', 'kebab-case', 'Squash Whitespace'], unicode: ['Invisible Text', 'Upside Down', 'Full Width', 'Small Caps', 'Bubble', 'Braille', 'Greek Letters', 'Wingdings', 'Superscript', 'Subscript', 'Regional Indicator Letters', 'Fraktur', 'Cyrillic Stylized', 'Katakana', 'Hiragana', 'Roman Numerals'], special: ['Medieval', 'Cursive', 'Monospace', 'Double-Struck', 'Elder Futhark', 'Mirror Text', 'Zalgo', 'Unicode Normalize (NFC)', 'Unicode Normalize (NFD)', 'Strip Diacritics', 'Unicode Escape (\u)'], fantasy: ['Quenya (Tolkien Elvish)', 'Tengwar Script', 'Klingon', 'Aurebesh (Star Wars)', 'Dovahzul (Dragon)'], diff --git a/js/transforms.js b/js/transforms.js index b6574ec..e52017a 100644 --- a/js/transforms.js +++ b/js/transforms.js @@ -2173,6 +2173,34 @@ const transforms = { preview: function(text) { return this.func(text); } }, + // Ubbi Dubbi (add 'ub' before vowels) + ubbi_dubbi: { + name: 'Ubbi Dubbi', + func: function(text) { + if (!text) return ''; + return text.replace(/([AEIOUaeiou])/g, 'ub$1'); + }, + preview: function(text) { return this.func(text || 'hello'); }, + reverse: function(text) { + if (!text) return ''; + return text.replace(/ub([AEIOUaeiou])/g, '$1'); + } + }, + + // Rövarspråket (Robber's language): consonant -> consonant + 'o' + consonant + rovarspraket: { + name: 'Rövarspråket', + func: function(text) { + if (!text) return ''; + return text.replace(/([b-df-hj-np-tv-z])/gi, (m) => m + 'o' + m); + }, + preview: function(text) { return this.func(text || 'robber'); }, + reverse: function(text) { + if (!text) return ''; + return text.replace(/([b-df-hj-np-tv-z])o\1/gi, '$1'); + } + }, + subscript: { name: 'Subscript', map: {