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 manifest for v3 spec #4

Open
kawazoe opened this issue Jun 6, 2022 · 12 comments
Open

Update manifest for v3 spec #4

kawazoe opened this issue Jun 6, 2022 · 12 comments

Comments

@kawazoe
Copy link

kawazoe commented Jun 6, 2022

Just as an FYI in case you missed it, loading the extension in dev mode will give you a warning that v2 of the manifest file is deprecated and you should be moving to v3. See https://developer.chrome.com/blog/mv2-transition/ for more info.

@ish-
Copy link
Owner

ish- commented Jun 6, 2022

@kawazoe yeah yeah
unfortunately v3 has certain restrictions towards to content script injecting, that makes extension unable to work :(
or maybe i missed something, anyway it required severe remake.. if you wish i can push branch for your research with my tryings about it =)

@ish-
Copy link
Owner

ish- commented Jun 6, 2022

@kawazoe
Copy link
Author

kawazoe commented Jun 6, 2022

Oh wow! I didn't really pay attention to the changes...

After a bit of reading, my understanding is that instead of using a content script in your manifest, you would have to switch to the new chrome.scripting api, like this: https://developer.chrome.com/docs/extensions/reference/scripting/#files The allFrames feature still exists through the target property, so not many changes there.

As long as you load your content.js like this as one of the first thing you would do in your background.js file, I think you'd be ok.

What kind of restrictions have you encountered?

EDIT: I have just seen the whole background page depreciation... Yeah that's a big one. At least, they provide a migration guide to help with that: https://developer.chrome.com/docs/extensions/mv3/migrating_to_service_workers/

@kawazoe
Copy link
Author

kawazoe commented Jun 6, 2022

@kawazoe here it is https://github.com/ish-/AuRo/tree/manifest-v3

I will check that out as soon as I get a chance! Like I said earlier, this extension is what makes my entire setup work, so I definitely want to keep using it. 😃

I see that you do not have a CONTRIBUTE.md file in your project. I agree with you that it looks like many things will have to change to better support the service worker design. Do you have any restrictions or preferences on how you want me to contribute? For instance, are you ok if I PR a large refactor? I just want to make sure that you don't feel like I'm taking over your project, or putting any pressure on you.

@ish-
Copy link
Owner

ish- commented Jun 6, 2022

@kawazoe it will be cool to see your PR in this repo!
i do not rush it right now, cause there is still time before fully deprecation in Jan-Jun 2023 =)
and ofcause I will not put spokes in the wheels of further development))

@kawazoe
Copy link
Author

kawazoe commented Jun 6, 2022

@ish- How do you want to handle the last few changes on main? Do you want me to start the migration over from the main branch or to backport the changes to your existing v3 branch?

@ish-
Copy link
Owner

ish- commented Jun 6, 2022

@kawazoe i think its possible to rebase last main changes into v3. test all staff there and then merge v3 into main when it will be ready

@kawazoe
Copy link
Author

kawazoe commented Jun 6, 2022

I'll see if that's possible, but I'll leave that to you if the merge gets too complicated. There is less risk of errors since you know the code better.

@ish-
Copy link
Owner

ish- commented Dec 12, 2022

@kawazoe can i merge v3 from your fork? or you want to pull request?

@kawazoe
Copy link
Author

kawazoe commented Dec 12, 2022

I can create a PR, but #7 found a small issue that appears to only happen during the initial install. I'll try to take a look at it today. Once that's fixed, it should be good to go.

@ish-
Copy link
Owner

ish- commented Dec 12, 2022

@kawazoe great!

@ish-
Copy link
Owner

ish- commented Jan 10, 2023

@kawazoe i will test it within a few days and then i would discuss some cases about initialization on demand (to not inject every page, but be convenient) and appearance

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