5

I have a chrome extension. I have a lot of code in the content script. Nowadays Google takes a lot of time to publish the extension. About 10-15 days due to covid etc. I have the same extension on Firefox too where I load all remote code through script injection. How can I do the same with the Chrome extension? When I try to load the remote script it gives me the following error.

This document requires 'TrustedScript' assignment.

I think Chrome became stricter with the release of version 83. Also as per ChromeStore support, a wrapper that loads the code remotely is the way to go. But I can't find suitable documentation or a sample code. Questions found on Stackoverflow are about 4-5 years old at minimum.

Also, some of the guys are of opinion that the Chrome store will reject the extension if we inject remote script. But following image belongs to the submission extension UI of Chrome Developer Dashboard.

And you can clearly see that I is saying that does your app requires remote code.

Remote Code permission image

Any help is highly appreciated.

AMBasra
  • 969
  • 8
  • 24
  • The Chrome's web store won't accept an extension that injects remotely hosted code. – wOxxOm Apr 17 '21 at 02:49
  • @wOxxOm I edited my question and added an image of the Chrome Developer Dashboard that explicitly asks about remote code. Please shed some light on it. – AMBasra Apr 19 '21 at 10:44
  • 1
    TrustedScript means chrome.scripting.executeScript in ManifestV3. – wOxxOm Apr 19 '21 at 11:54

0 Answers0