Skip to content

Update host_permissions and Improve UI for Token Counter #4

@cybersholt

Description

@cybersholt

Description

The Chainstack DLP extension currently does not support the new URL patterns for ChatGPT sessions, which might prevent the extension from functioning correctly on all pages. Additionally, there is a UI issue where the token counter overlaps with the attachment button in the ChatGPT interface.

Proposed Changes

  1. Update Host Permissions:

    • Add the new URL patterns to host_permissions in the manifest.json to ensure the extension functions across all current ChatGPT pages. The updated URL patterns might include:
      "https://chat.openai.com/*",
      "https://chatgpt.com/c/*"
      
    • It is crucial to verify all URL patterns where the extension should be active and update them accordingly.
  2. UI Improvement for Token Counter:

    • Adjust the CSS or positioning logic for the token counter to ensure it does not overlap with other UI elements, such as the attachment button in the ChatGPT interface. This might involve adjusting z-index values, margins, or other CSS properties to improve the visibility and accessibility of the token counter.
            tokenCountElement.style.position = "absolute";
            tokenCountElement.style.left = "45%";
            tokenCountElement.style.bottom = "0";

Additional Information

  • The above URL patterns and UI changes are based on the current ChatGPT interface and may need to be reviewed if the interface changes again in the future.
  • It's important to ensure that these changes are tested on multiple browsers and screen sizes to maintain a consistent user experience.

I am willing to contribute the code changes required for these updates if there's interest in integrating these modifications into the main project and will post a PR shortly.

Thank you for considering these changes. Addressing them would significantly enhance the functionality and user experience of the Chainstack DLP extension.

image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions