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

Matches on content_script dont work #116

Open
5 tasks done
capoia opened this issue Mar 7, 2023 · 2 comments
Open
5 tasks done

Matches on content_script dont work #116

capoia opened this issue Mar 7, 2023 · 2 comments

Comments

@capoia
Copy link

capoia commented Mar 7, 2023

Describe the bug

Hello, first of all thank you very much for your contribution, it has helped me a lot.

I need my extension to work only on a specific URL (the whatsapp one) I needed the extension not to appear on other sites, nor the popup (or be disabled to click if it is outside whatsapp)

I tried adding "matches: ["*://web.whatsapp.com/"]," inside the content_scripts but it doesn't work, how would I do that?
it doesn't add any match statements to the manifest.json inside the extension folder.

There is no way to put a minimum reproduction in this case, because the "problem" happens after you put the extension in the browser

You can see my manifest.ts on the reproduction link.

As you can see, extension works on every page.
CleanShot 2023-03-07 at 13 38 31@2x

Reproduction

https://stackblitz.com/github/antfu/vitesse-webext?file=src/manifest.ts

System Info

System:
    OS: macOS 13.0
    CPU: (8) arm64 Apple M1
    Memory: 78.72 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.17.0/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
  Browsers:
    Chrome: 110.0.5481.177
    Firefox: 110.0.1
    Safari: 16.1

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@damevin
Copy link

damevin commented May 8, 2023

Hello there! Did you find a way to do that?

@tmkx
Copy link
Collaborator

tmkx commented Mar 12, 2024

the reproduction link is invalid, can u provide a new one?

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

3 participants