Skip to content

Fast copy a Degit command path in github repository pages

License

Notifications You must be signed in to change notification settings

aliuq/degit-webext

Repository files navigation

Degit Webext

firefox firefox chrome chrome

A web extension for Degit, it generates a button and add a shortcut key to fast copy a Degit command path in github repository page, support chrome and firefox now.

xuanfa

About

Forked from vitesse-webext, and modified to fit my needs. chrome manifest v3 is different from v2. the most important thing is that v2 is disabled loading script from remote server, so HMR in development is not supported. another thing is that firefox doesn't support manifest v3 yet.

Development

Because of the manifest version different between chrome(mv3) and firefox(mv2), You have to use different way to develope and build the extension. it has some default configuration, auto open devtools, start maximize window and start urls.

For chrome: ensure chromium is installed, and then run the following command:

pnpm dev:chromium
pnpm start:chromium

# Build
pnpm build:chromium
pnpm run pack

For firefox: ensure firefox is installed, and added to the environment variable PATH. if not, you have to point to the firefox executable file. another thing is that firefox has a firefoxProfile field in package.json, you can delete this line or provide a profile name to start firefox with a profile. type about:profiles in the firefox address bar, you can find your all profiles. then run the following command:

pnpm dev:firefox
pnpm start:firefox

# Build
pnpm build:firefox
pnpm run pack

For other browsers based on Google kernel, you can through setting --chromium-binary value to develope and debug the extension. e.g.

web-ext run -t chromium --chromium-binary C:/software/XXX/XXX.exe

License

MIT