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

Manifest.json permissions are over-scoped #3

Open
helfrichmichael opened this issue Mar 4, 2022 · 3 comments
Open

Manifest.json permissions are over-scoped #3

helfrichmichael opened this issue Mar 4, 2022 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@helfrichmichael
Copy link

Hi,

Great extension and idea. I've been pretty bummed with Thingiverse continuing to deteriorate their platform, so I'm a huge fan of this idea!

Looking at the content script injection approach, the permissions are a little over-scoped IMO given the intention of this extension (it wants access to any and all websites).

Would it be possible to modify the content script matching to https://*thingiverse.com/* and/or https://www.thingiverse.com/*. This will restrict the extension to only injecting the content script into Thingiverse webpages. In the current approach, I believe this is injecting the JS into every single webpage you are visiting.

More on this here https://developer.chrome.com/docs/extensions/mv3/content_scripts/#static-declarative.

Happy to make a pull request if you're open to that also.

@stephancasas
Copy link
Owner

Hi, Michael!

Thanks for raising this issue. I agree that the permissions are over-scoped. This was an unintended consequence of adjusting the extension icon's fill colour based on context. When the frontmost tab is pointed at a location on thingiverse.com, the extension's icon should be blue. Elsewhere, it should be either a light or dark grey — based on the user's dark/light-mode preference.

I couldn't think of a way (admittedly, I didn't try very hard) to modify this (including dark/light resolution) without reading the current tab via injection, but if you can think of another option, I'd definitely be open to a pull request or a suggestion.

Thanks!

@stephancasas stephancasas added enhancement New feature or request good first issue Good for newcomers labels Mar 4, 2022
@helfrichmichael
Copy link
Author

Thanks, I took a poke at this in #4. Let me know what you think :).

@stephancasas
Copy link
Owner

I'll take a look this evening! Thanks for taking a stab at this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants