Skip to content

feat: Improve script injection and migrate to Manifest V3 #18

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

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

ChuHoMan
Copy link
Contributor

resolve #17 #16

Hello, I have solved the problem of script injection displayed in the network (PS: partially based on the idea of react-devtools-extensions, the code has notes). During the process, I migrated to Manifest v3 because I could not use the browser.scripting property. However, Firefox does not support Manifest v3, so I built two dist dir.

Now it runs well, and I have tested it locally on Firefox and Chrome. Do you have any other suggestions?

Before:
before

After:
截屏2023-03-31 11 16 39

@atinux atinux merged commit 8ea5079 into nuxtlabs:master Apr 13, 2023
@atinux
Copy link
Member

atinux commented Apr 13, 2023

Thank you so much @ChuHoMan ❤️

@a1vin1au
Copy link

a1vin1au commented Apr 19, 2023

When I enabled device mode with Chrome devtools, it will keep on showing Uncaught TypeError: t.extension.getURL is not a function, I think that is because User Agent is different when enabling device mode~

Chrome browser version 112.0.5615.137

Screenshot 2023-04-19 at 12 15 25 PM

Screenshot 2023-04-19 at 12 15 39 PM

@ChuHoMan
Copy link
Contributor Author

When I enabled device mode with Chrome devtools, it will keep on showing Uncaught TypeError: t.extension.getURL is not a function, I think that is because User Agent is different when enabling device mode~

Chrome browser version 112.0.5615.137

Screenshot 2023-04-19 at 12 15 25 PM

Screenshot 2023-04-19 at 12 15 39 PM

Yes, you are right, I also reproduced. But using browser.extension.getURL('injected.js') is the previous logic that has nothing to do with this PR. Maybe I can try to fix it later.

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

Successfully merging this pull request may close these issues.

Migrate to Manifest V3
3 participants