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

Glarity is causing javascript error on every other website #61

Closed
reorx opened this issue Mar 29, 2023 · 3 comments
Closed

Glarity is causing javascript error on every other website #61

reorx opened this issue Mar 29, 2023 · 3 comments

Comments

@reorx
Copy link

reorx commented Mar 29, 2023

Describe the bug
Glarity is causing javascript error on every other website that is not in the supported site list, including but not limited to:

image

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome

You are injecting content script on every website

   "content_scripts": [ {
      "css": [ "content-script.css" ],
      "js": [ "content-script.js" ],
      "matches": [ "\u003Call_urls>", "*://*/*" ]
   } ],

This is understandable because the websites Glarity supports are extensible, and matching sites in the manifest is too much hassle.

But you should enhance the code to change irrelevant pages as little as possible. I believe this error is caused by not checking whether the site is in the supported site list and assuming something should be there to proceed.

Also, I think you should avoid injecting css this way. It's uncontrollable, you should let the content-script.js inject the css after checking it is a supported site.

@givebest
Copy link
Collaborator

@reorx Please tell me which version you are using.

@reorx
Copy link
Author

reorx commented Mar 29, 2023 via email

@givebest
Copy link
Collaborator

givebest commented Mar 29, 2023

You can try our beta version, which fixes this issue and adds many new features. https://github.com/sparticleinc/chatgpt-google-summary-extension/tree/beta/packages

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

2 participants