mirror of
https://github.com/elder-plinius/P4RS3LT0NGV3.git
synced 2026-05-26 18:07:51 +02:00
afe00b3534
- API key retrieval now trims whitespace (pasted keys with spaces caused auth failures) - Fallback to Vue data property if localStorage is empty (covers forgot-to-save case) - Auto-saves key to localStorage when found only in Vue data - HTTP-level error handling (401/402/403) with clear user-facing messages - Changed HTTP-Referer from window.location.origin to window.location.href (origin returns "null" for file:// URLs, breaking OpenRouter requests) - Handle non-JSON error responses gracefully - Handle string-type error responses from OpenRouter - Added missing else branch for empty API responses - Updated README with AI Translation, PromptCraft, and OpenRouter key setup docs https://claude.ai/code/session_01DjqbQB8WcZoGVe78sjvh72
JavaScript Directory Structure
Core Modules (js/core/)
decoder.js- Universal decoder for automatic encoding detectionsteganography.js- Emoji and invisible text steganographyemojiLibrary.js- Emoji search, filtering, and library functionstoolRegistry.js- Tool registration and Vue data/method merging
Utilities (js/utils/)
clipboard.js-ClipboardUtils.copy()- Clipboard API wrapperfocus.js-FocusUtils.focusWithoutScroll(),clearFocusAndSelection()history.js-HistoryUtils- Copy history managementnotifications.js-NotificationUtils- Toast notificationstheme.js-ThemeUtils- Dark/light theme managementescapeParser.js- Escape sequence parsing
Tools (js/tools/)
Tool classes extending Tool base class. Auto-discovered by build/inject-tool-scripts.js.
Data (js/data/)
emojiData.js- Generated emoji data (build output)emojiCompatibility.js- Emoji compatibility mappings
Bundles (js/bundles/)
transforms-bundle.js- Bundled transformer modules (build output)
Load Order
- Data files (emojiData, emojiCompatibility)
- Generated bundles (transforms-bundle)
- Utilities (escapeParser, focus, notifications, history, clipboard, theme)
- Core modules (steganography, decoder, emojiLibrary)
- Tool system (Tool.js, *Tool.js files, toolRegistry)
- Main app (app.js)