nandenjin / tsukimi

Utility as browser extension for Cosense (scrapbox.io) users
https://chrome.google.com/webstore/detail/tsukimi/cnabeodkjobnolgplpcalkkkjgjkjbad
0 stars 0 forks source link

Cross-browser support for Chrome and Firefox #36

Open nandenjin opened 1 month ago

nandenjin commented 1 month ago

https://developer.mozilla.org/ja/docs/Mozilla/Add-ons/WebExtensions/Chrome_incompatibilities

nandenjin commented 1 month ago

Note: Tried to submit Tsukimi to Firefox Store, but got the error:

“/background/service_worker” is not supported

nandenjin commented 3 weeks ago

It seems that CRXJS drops background.scripts prop

// vite.config.ts
background: {
  service_worker: 'src/background/tsukimi-background.ts',
  scripts: ['src/background/tsukimi-background.ts'],
}
// dist/manifest.json
"background": {
  "service_worker": "service-worker-loader.js",
  "type": "module"
},
nandenjin commented 3 weeks ago

I found browser switch on crxjs, it works fine https://github.com/crxjs/chrome-extension-tools/pull/776