warcreate
warcreate copied to clipboard
Adapting code to use manifest v3
https://www.bleepingcomputer.com/news/software/google-begins-testing-extension-manifest-v3-in-chrome-canary/
It will have significant changes to the webRequest API, which WARCreate extensively uses.
Now available in Chrome 88 beta per https://blog.chromium.org/2020/12/manifest-v3-now-available-on-m88-beta.html
Note the deprecated of background pages in favor of service workers.
The beta still does not read all attributes of Manifest v3. Use the Dev channel build for testing.
https://github.com/kentbrew/learning-manifest-v3/blob/master/ep_004.md
chrome.tabs.getSelected()
has been deprecated per https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/ , so the code needs to be adapted.
The usage of chrome.tabs.connect in serviceWorker.js, e.g.,
let port = chrome.tabs.connect(tab.id, { name: 'getImageData' }) // create a persistent connection
port.postMessage({ url: tab.url, method: 'getImageData' })
causes an error, observable in the popup's console, that says,
Error handling response: TypeError: Error in invocation of tabs.connect(integer tabId, optional object connectInfo): No matching signature.
In the "Long-Lived Connections" section of https://developer.chrome.com/docs/extensions/mv2/messaging/ , the link to "tabs.connect" is a 404. Attempting to view the signature says, "VM311:1 function connect() { [native code] }".
https://developer.chrome.com/docs/extensions/mv3/mv2-sunset/ To be deprecated for existing extensions in January 2023