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

fix manifest v3 issue #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix manifest v3 issue #13

wants to merge 1 commit into from

Conversation

nikkiBot
Copy link

ss
Manifest v2 is now deprecated, and thus the shift to v3 was needed

@optimisan
Copy link

Great, I was just working on this

Copy link

@optimisan optimisan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few suggestions, I will appreciate if you take a look!

Comment on lines +23 to +27
"script.js",
"style.css",
"icon.png",
"manifest.json",
"csp.js"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure you need all these?

Only csp.js is working for me.

Comment on lines +32 to +33
script.src = chrome.runtime.getURL('public/csp.js') ;
(document.head || document.documentElement).appendChild(script);
Copy link

@optimisan optimisan Nov 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor content.ts

Since csp.js is a separate file, I think content.ts is doing too many things.

We can remove this disabling business out of content.ts and keep this as a content script instead of injecting.

csp.js will inject the code instead, which can be something like this:

const disablingCode = ```$('#sortable_nav').sortable('destroy');
$('#sortable_nav').enableSelection();
```
const script = document.createElement('script');
script.textContent = disablingCode;
(document.head || document.documentElement).appendChild(script);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a separate pull request though.

"activeTab",
"scripting"
],
"action": {},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default_icon key is recommended here (which is basically a copy-paste from the icons above).

Also, you can add a default_title here that is shown as a tooltip on hover:

"action": {
		"default_icon": {
			"32": "icon.png",
			"48": "icon.png",
			"64": "icon.png",
			"128": "icon.png"
		},
		"default_title": "Click to run PS-Extender"
	}

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.

2 participants