V
V
Vitaly2019-11-14 15:04:38
Google
Vitaly, 2019-11-14 15:04:38

Where should chrome.permissions.request or chrome.permissions.contains be called?

All the best!
After updating my extension, Google decided to check it in detail, and then removed it, referring to the fact that I violate the permissions and User Data Privacy policies , without specific explanations. As I understand it, due to the fact that the manifest contains many permissions
manifest file: 

"permissions": [
        "notifications",
        "storage",
        "cookies",
        "tabs",
   “*://site1/*”, “*://site2/*”, “*://site3/*”, “*://site4/*”, “*://site5/*”, “*://site6/*”, “*://site7/*”, “*://site8/*”, “*://site9/*”, “*://site10/*”, “*://site11/*”,  …….. “*://site20/*”

    ],
…

"content_scripts": [
    {
        "matches": ["http://127.0.0.1/*","http://localhost/*",“*://site1/*”, “*://site2/*”, “*://site3/*”, “*://site4/*”, “*://site5/*”, “*://site6/*”, “*://site7/*”, “*://site8/*”, “*://site9/*”, “*://site10/*”, “*://site11/*”,  …….. “*://site20/*”],
        "js": ["js/lib.js”, "js/main.js”]
    }],

I think maybe I will be able to restore extensions if I transfer all permissions to optional_permissions, but here I actually have a problem - I don’t understand where to call chrome.permissions.request or chrome.permissions.contains. Tried with content_scripts (in my case it's js/main.js) getting error : Cannot read property 'request' of undefined . And also in default_popup but there is also an error R eferenceError: permissions is not defined
I would be grateful for the help

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question