Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update host_permissions and Improve UI for Token Counter #4

Open
cybersholt opened this issue May 13, 2024 · 0 comments
Open

Update host_permissions and Improve UI for Token Counter #4

cybersholt opened this issue May 13, 2024 · 0 comments

Comments

@cybersholt
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant