Article Here: https://tech.fusic.co.jp/posts/2022-03-15-chrome-webext-tab-shifter/
- Shift active tab to left / right
- Left-end :
Cmd + Ctrl + J
- Right-end :
Cmd + Ctrl + K
- Left-end :
- Shift active tab to left-end / right-end
- Left-end :
Cmd + Ctrl + H
- Right-end :
Cmd + Ctrl + L
- Left-end :
src
- main source.contentScript
- scripts and components to be injected ascontent_script
background
- scripts for background.components
- auto-imported Vue components that are shared in popup and options page.styles
- styles shared in popup and options pagemanifest.ts
- manifest for the extension.
extension
- extension package root.assets
- static assets.dist
- built files, also serve stub entry for Vite on development.
scripts
- development and bundling helper scripts.
pnpm dev
Then load extension in browser with the extension/
folder.
For Firefox developers, you can run the following command instead:
pnpm start:firefox
web-ext
auto reload the extension when extension/
files changed.
While Vite handles HMR automatically in the most of the case, Extensions Reloader is still recommanded for cleaner hard reloading.
To build the extension, run
pnpm build
And then pack files under extension
, you can upload extension.crx
or extension.xpi
to appropriate extension store.
This uses template antfu/vitesse-webext: ⚡️ WebExtension Vite Starter Template 🙏 Huge thanks.