Rob Wu 3fe256cd0d [CRX] Set manifest_version to 3
- Replace DOM-based pdfHandler.html (background page) with background.js
  (extension service worker).

- Adjust logic of background scripts to account for the fact that the
  scripts can execute repeatedly during a browser session. Primarily,
  register relevant extension event handlers at the top level and use
  in-memory storage.session API to keep track of initialization state.

- Extension URL router: replace blocking webRequest with the service
  worker-specific "fetch" event.

- PDF detection: replace blocking webRequest with declarativeNetRequest.
  This requires Chrome 128+. The next commit will add a fallback for
  earlier Chrome versions.
2024-09-08 16:35:13 +02:00

37 lines
597 B
Plaintext

{
"extends": [
../../.eslintrc
],
"env": {
"webextensions": true
},
"parserOptions": {
"sourceType": "script"
},
"rules": {
"no-var": "off",
},
"overrides": [
{
// Include all files referenced in background.js
"files": [
"options/migration.js",
"preserve-referer.js",
"pdfHandler.js",
"extension-router.js",
"suppress-update.js",
"telemetry.js"
],
"env": {
// Background script is a service worker.
"browser": false,
"serviceworker": true
}
}
]
}