Quick-Text-Buttons

Adds customizable text buttons to paste frequently used prompts into [ChatGPT/Gemini/Claude] inputs.

A continuación se muestran las versiones de este script en las que se actualizó el código. Ver todas las versiones.

  • v3.3.5 26/05/2026

    [IMPORTANT] Compatibility

    Due to updates to the internal monitoring and coordination mechanisms, strict version matching is required when using this script together with my other scripts:

    • AI UX Customizer (AIUXC): v1.4.3+
    • Quick Text Buttons (QTB): v3.3.3+
    • Gemini Default Model Setter (GDMS): v1.2.3+

    [3.3.5] - 2026-05-26

    • Fixed & Optimized
      • [TextEditor] Fixed a bug where icon-only buttons (move up/down, delete) inside the text editor modal were completely unresponsive when clicked.
      • [TextEditor] Restored full functionality to the drag-and-drop text item reordering mechanism.

    [3.3.4] - 2026-05-26

    • Core Changes
      • [UI] Optimized modal window creation to prevent double-rendering and ensure smoother interface transitions.
      • [Code Quality] Cleaned up redundant background initialization tasks to streamline internal lifecycle management.

    [3.3.3] - 2026-05-26

    • Core Changes
      • [Navigation] Upgraded the page navigation monitor to support co-existing scripts, preventing event interference on shared pages.
      • [Navigation] Improved stability and performance during rapid page transitions by ensuring obsolete background tasks are immediately cancelled.
  • v3.3.2 25/05/2026

    [3.3.2] - 2026-05-25

    • Core Changes
      • [Sentinel] Enhanced internal handling to ensure continuous and reliable node detection even on websites with unique or complex page update processes.
      • [Sentinel] Optimized background event handling while the monitor is suspended, reducing the overall performance impact on the browser.
  • v3.3.1 24/05/2026

    [IMPORTANT] Compatibility: Due to updates in NavigationMonitor, if using this script with my other scripts, strict version matching is required:

    • AI UX Customizer (AIUXC): v1.4.1+
    • Quick Text Buttons (QTB): v3.3.1+
    • Gemini Default Model Setter (GDMS): v1.2.1+

    [3.3.1] - 2026-05-24

    • Fixed & Optimized
      • [LifecycleManager] Disabled URL hash tracking (trackHash: false) to prevent redundant app re-initialization cycles triggered by intra-page modal interactions.
      • [LifecycleManager] Adapted to the updated NavigationMonitor API by passing the functional unsubscription token returned by on() directly to addDisposable for reliable lifecycle resource management.
  • v3.3.0 24/05/2026

    [3.3.0] - 2026-05-24

    • Core Changes
      • Total overhaul of resource lifecycle management to ensure zero memory leaks and faster overall response times.
      • Implemented comprehensive error guards and runtime type checking to eliminate unexpected script crashes during input field interactions.
      • Switched asset endpoints to a public CDN for optimized script loading speed and icon availability.
      • [NavigationMonitor] Stabilized concurrent execution of multiple scripts under the same owner ID, eliminating missed page navigation triggers.
      • [NavigationMonitor] Added full support for single-page applications utilizing hash-based (#) routing pipelines.
      • [Sentinel] Enhanced multi-script safety to prevent layout and style conflicts when multiple instances run simultaneously on the same page.
      • [Sentinel] Implemented safe frame synchronization and polling limits to eliminate browser freeze risks during delayed or heavy page loading.
      • [Sentinel] Introduced a lazy recovery mechanism to robustly handle initialization timeouts caused by external long tasks without disrupting multi-script environments.
  • v3.2.0 06/05/2026

    [3.2.0] - 2026-05-06

    • New Features
      • [Claude] Added official support for Claude (claude.ai).
    • Core Changes
      • Enhanced the internal text insertion logic to handle complex editor behaviors, specifically for Claude's editor.
      • Minor internal code improvements for better stability.
  • v3.1.5 20/03/2026

    [3.1.5] - 2026-03-20

    • Core Changes
      • Updated internal data storage mechanisms to use modern asynchronous APIs (GM.getValue / GM.setValue), ensuring more stable and reliable saving and loading of your settings.

    [3.1.4] - 2026-03-20

    • Core Changes
      • Ported critical stability and lifecycle improvements for the core element detection engine (Sentinel) from the AIUXC project.
      • Fixed an issue where duplicate CSS rules could accumulate during rapid DOM updates, preventing potential performance degradation (CSSOM bloat).
      • Enhanced resource cleanup (teardown processes) to prevent memory leaks during page navigation. Added robust error isolation to ensure the observation loop continues running even if individual callbacks fail.
      • Modernized internal object property checks within the configuration resolution logic for consistency and improved code readability.
      • Modernized underlying DOM manipulation and data access methods to improve overall script efficiency and long-term maintainability.
      • Modernized internal object property checks within the logging utility for improved reliability and cleaner code execution.
      • Tightened internal type definitions to ensure stricter code validation and prevent potential edge-case errors.
      • Optimized the performance of configuration size validation, reducing memory usage and improving responsiveness when typing in the JSON Settings editor.
      • Optimized the internal UI rendering logic to provide smoother interactions when opening menus and updating text lists.
  • v3.1.3 20/03/2026

    [3.1.3] - 2026-03-20

    • Bug Fixes
      • [ChatGPT] Fixed an issue where inserting multiline text would lose its line breaks. Text formatting is now accurately preserved when pasted into the input field.
    • Improvements
      • Upgraded the underlying text insertion logic to ensure robust compatibility and reliable behavior across different AI platforms (ChatGPT and Gemini).
  • v3.1.2 20/02/2026

    [3.1.2] - 2026-02-20

    • Bug Fixes
      • [Sentinel] Fixed an issue where element detection could fail after SPA page navigation or long background tab inactivity.
    • Core Changes
      • [Sentinel] Restored stable shared DOM detection architecture with added self-healing capabilities.
      • [Sentinel] Improved robustness during CSS rule deletion to prevent unexpected execution errors.
  • v3.1.1 11/02/2026

    [IMPORTANT] Compatibility: Due to updates in the DOM observation engine (Sentinel), if using this script with UX Customizer (AIUXC/GPTUX/GGGUX), strict version matching is required:

    • QTB v3.1.1+ with AIUXC v1.0.0-b479+ / GPTUX v2.4.1+ / GGGUX v2.4.1+
    • QTB v3.1.0- with AIUXC v1.0.0-b478- / GPTUX v2.4.0- / GGGUX v2.4.0-

    [3.1.1] - 2026-02-11

    • Core Changes
      • [Sentinel] Optimized DOM detection performance.
      • [Sentinel] Improved error handling and memory efficiency.
  • v3.1.0 10/02/2026

    [3.1.0] - 2026-02-10

    • Improvements
      • [Core] Improved text insertion stability and compatibility with ChatGPT and Gemini by adopting a new native-like input method.
      • [Text Editor] Enhanced keyboard navigation: Focus is now intelligently maintained when adding, moving, or deleting items, allowing for smoother continuous editing.
      • [Text Editor] Improved Escape key behavior: Pressing Esc while editing (renaming/deleting) now exits the edit mode instead of immediately closing the modal.
      • [Performance] Optimized the Settings Panel to reduce lag by preventing unnecessary re-renders during state updates.
    • Fixes
      • [Text Editor] Input fields and controls are now properly disabled and dimmed during rename or delete actions to prevent accidental changes.
      • [UI] Updated icons to ensure visual consistency across the interface.
  • v3.0.0 14/01/2026

    [3.0.0] - 2026-01-14

    • New Features
      • [Interaction] Added full keyboard navigation support for the text list (Arrow keys, Enter, Tab).
      • [Shortcut] Introduced a global keyboard shortcut (Alt+Q) to quickly toggle the text list visibility.
      • [UI] Added a profile navigation bar to the text list header, allowing quick profile switching directly within the list view.
      • [Help] Added a "Shortcuts & Controls" cheat sheet modal for quick reference of available key bindings.
      • [UI] Implemented responsive positioning for the text list to intelligently adjust its placement based on available screen space.
    • Improvements & Changes
      • [Config] (Important) Restructured the internal data format from Objects to Arrays to improve reliability and guarantee item ordering.
      • Compatibility: JSON exported from v2.x can be imported into v3.0.0 (auto-migrated), but JSON exported from v3.0.0 is not compatible with older versions.
      • Action Required: It is highly recommended to export your settings again after updating to create a fresh backup compatible with v3.0.0.
      • [UI] Refined the Settings Panel layout for better consistency, replacing the custom slider control with standard inputs.
      • [System] Updated the default configuration with improved sample prompts for new users.
      • [System] Added /apps to the ChatGPT exclusion list to prevent script execution on incompatible pages.
  • v2.2.0 03/12/2025

    [2.2.0] - 2025-12-03

    • New Features
      • Added a Trigger Mode option to the settings panel. Users can now choose between "Hover" (default) or "Click" to open the text list.
      • Added support for Right-clicking the insert button to quickly open the settings panel, regardless of the selected trigger mode.
    • Improvements
      • The insert button's tooltip now dynamically updates to indicate the current interaction mode.
    • Fixes
      • Fixed a race condition where global event listeners could persist if the text list was toggled rapidly.
      • Fixed an issue where the text list or settings panel would remain visible after navigating to a different chat URL.
      • Fixed various resource leaks to prevent memory issues and improve long-term stability.
    • Miscellaneous
      • Updated the script icon.
  • v2.1.0 02/12/2025

    [2.1.0] - 2025-12-02

    • UI Improvements
      • [Modal Standardization]
      • Buttons now follow a consistent order (Cancel, Apply, Save) across all menus.
      • The "Save" button is now visually highlighted as the primary action.
      • Enforced uniform button widths for a cleaner look.
      • [JSON Settings] Improved button layout for better usability. File operations (Export, Import) are now separated from dialog actions (Cancel, Save) to prevent accidental clicks.
    • Core Improvements
      • Enhanced internal security and stability, including better compatibility with strict browser security environments (CSP).
  • v2.0.0 28/11/2025

    [2.0.0] - 2025-11-28

    • UI & UX Improvements
      • ChatGPT: Improved layout integration by switching to native positioning, ensuring the button blends perfectly with the interface.
      • Gemini: Refreshed the button design to fully align with Material Design 3 styles.
      • Text Editor: Improved list navigation; deleting an item now selects the next item instead of the previous one for a smoother workflow.
    • Core Changes
      • Engine Upgrade: Re-introduced the Sentinel engine with significant enhancements, replacing MutationObserver to deliver faster, conflict-free, and more reliable button placement.
      • Increased the maximum configuration storage limit from 4.8MB to 10MB.
      • Added automatic retry logic to ensure the button appears correctly even if the target element is temporarily detached.
      • Optimized configuration handling to automatically discard obsolete settings.
  • v1.4.0 24/11/2025

    [1.4.0] - 2025-11-24

    • UI Improvements
      • Unified Interface: Merged the Settings and Insert buttons into a single, streamlined control.
      • Relocation: Moved the button to the bottom-left of the input area for better accessibility and reduced visual clutter.
      • New Interaction: Simply hover over the button to reveal the Quick Text list, or click it to open the Settings panel.
    • Core Improvements
      • Monitoring Engine: Replaced the legacy CSS-based Sentinel with a MutationObserver engine to avoid conflicts with GPTUX/GGGUX.
      • Persistence: Added a "Keep-Alive" mechanism that instantly detects if the chat input is redrawn by the website (e.g., during page navigation) and restores the buttons immediately.
      • Data Integrity: Enhanced data validation to automatically detect and repair corrupted text profiles instead of causing errors.
    • Internal Refactoring
      • Optimization: Replaced legacy object cloning with a more efficient deepClone utility and standardized event handling.
      • Configuration: Refactored internal configuration logic (ConfigProcessor) to improve separation of concerns and consistency.
  • v1.3.0 16/11/2025

    [1.3.0] - 2025-11-16

    • New Features & UI Improvements
      • [ChatGPT] Improved button positioning logic. The buttons will now detect and avoid colliding with other UI elements (like native buttons or other UserScripts).
    • Fixes
      • Fixed a major bug where the script would fail to re-initialize or position buttons correctly when using SPA navigation (e.g., switching chats or navigating from /gpts to a chat) without a full page reload.
    • Core Changes & Refactoring
      • Rebuilt the Settings Panel using a new declarative UI schema. This internal refactor improves maintainability and makes future options easier to add.
      • Modernized core utilities (Logger, EventBus, Sentinel) for better performance, debugging, and stability.
      • Improved config merging to correctly preserve nested user settings (like options and developer settings) instead of being overwritten by defaults.
      • Introduced new internal utilities (withLayoutCycle, runWhenIdle) to optimize layout performance and task scheduling.
  • v1.2.0 25/09/2025

    [1.2.0] - 2025-09-25

    • Performance & Stability
      • Reworked the internal event handling system to be more efficient. This reduces the script's resource usage and improves responsiveness.
      • The configuration management system has been hardened to better handle and sanitize data, improving overall script reliability.
    • Internal Refactoring
      • Major internal components, such as the PlatformAdapter, have been refactored for better modularity. This creates a more stable foundation for future updates and feature development.

    [1.1.2] - 2025-09-15 (private)

    • Internal Improvements
      • The execution guard, which prevents the script from running multiple times on the same page, has been refactored into a dedicated class. This improves the script's startup robustness and code organization.
  • v1.1.1 04/09/2025

    [1.1.1] - 2025-09-05

    • Refactored
      • Consolidated duplicated profile/category logic in TextEditorModalComponent into generic handler methods (_handleItemNew, _handleItemCopy, _handleItemDelete, _handleItemMove, _handleRenameConfirm).
      • Reduced code duplication and complexity by applying the DRY principle, improving maintainability and future extensibility.
  • v1.1.0 31/08/2025

    [1.1.0] - 2025-08-31

    • Changed
      • Default insertion position is now cursor.
    • Refactored
      • Text Insertion logic corrected for reliable text pasting/insert.
      • Restored-text handling on ChatGPT supported (ProseMirror “revived” content edge case).
      • Empty-line detection hardened to avoid false positives/negatives in whitespace-heavy inputs.
      • Split PlatformAdapter responsibilities to clarify site-specific duties and reduce coupling.
      • Refactored watcher/observer structure to simplify startup and improve maintainability.
      • Text processing refactor & unification across ChatGPT and Gemini editors.
      • Debounce binding for instance methods using .bind(this); ensures the correct this context.
      • Subscription lifecycle management improved to prevent leaks and dangling listeners.
      • Replaced the old app ID cqtb with APPID.
  • v1.0.1 14/08/2025

    [1.0.1] - 2025-08-15

    • Added: Implemented dynamic UI adjustment to prevent interference when the Canvas feature is active.
      • Buttons: The script's buttons now automatically reposition to avoid overlapping with the Canvas (ChatGPT only).
    • Changed: Updated script icon URL to link to an icon file in the repository instead of using base64 encoding.
  • v1.0.0 05/08/2025