warcreate icon indicating copy to clipboard operation
warcreate copied to clipboard

Adapting code to use manifest v3

Open machawk1 opened this issue 4 years ago • 6 comments

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.

machawk1 avatar Nov 12 '19 16:11 machawk1

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.

machawk1 avatar Dec 09 '20 20:12 machawk1

The beta still does not read all attributes of Manifest v3. Use the Dev channel build for testing.

machawk1 avatar Dec 20 '20 21:12 machawk1

https://github.com/kentbrew/learning-manifest-v3/blob/master/ep_004.md

machawk1 avatar Dec 23 '20 20:12 machawk1

chrome.tabs.getSelected() has been deprecated per https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/ , so the code needs to be adapted.

machawk1 avatar Dec 23 '20 21:12 machawk1

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] }".

machawk1 avatar Dec 23 '20 21:12 machawk1

https://developer.chrome.com/docs/extensions/mv3/mv2-sunset/ To be deprecated for existing extensions in January 2023

machawk1 avatar Sep 25 '21 14:09 machawk1