Skip to content

Draft: Port to Manifest v3

Kai Uwe Broulik requested to merge work/kbroulik/manifestv3 into master

DO NOT MERGE – NICHT ZUSAMMENFÜHREN – PAS FUSIONNER – NO FUSIONAR – NÃO MESCLAR

We can only merge this into master once Firefox supports it (no point in doing a separate packaging for FF and Chrome if FF will support it eventually "end of 2022" anyway)


Port chrome.tabs.executeScript to chrome.scripting.executeScript

Port chrome.browserAction to chrome.action

And add some try catch to make it more resilient

Make use of "userAgentData" for detecting Google Chrome

The plugins aren't exposed to the navigator on a WorkerScript and this is a much better approach, too. (new in Chrome 90)

Port historyrunner favicon fetching to new favicon API

XMLHttpRequest is also not a thing for service workers.

Add service-worker.js

It just loads all the JS files to be as compatible to before as possible

Migrate manifest.json to v3

  • Justifies a version 2.0
  • Replace background page with service worker
  • Add favicon permission, host permission for everything
  • browser_action -> action
  • Remove obsolete stuff

Add history permission

If we're messing with the permissions anyway, might as well use the chance to make "history" a mandatory permission so the history runner works out of the box.


Been using it as daily driver for weeks. Tabs runner, history runner, download stuff working well.

Media controls I just ported tonight after Fabian merged the content-script stuff, many thanks for that! Purpose also seems to work fine.

@fvogt

Edited by Kai Uwe Broulik

Merge request reports