The following steps demonstrate triggering a Chrome extension permissions update warning and subsequent disabling of an extension due to new permissions.
This example walks through a simple Chrome extension to make a web page background red. It also includes a content script that displays an alert when clicking the web page.
3 versions of the manifest.json exist:
- Version 2.0: Declares the initial extension permissions.
- Version 2.1: Declares new extension permissions and will not trigger an update warning from Chrome.
- Version 2.2: Declares a new extension permission that will trigger an update warning from Chrome.
The following steps test the 3 scenarios.
-
Open Chrome->Manage Extensions.
-
Click Pack Extension.
-
Select the source folder and click Pack extension.
-
Drag and drop the .crx file into the Chrome extensions page to install.
-
Confirm a warning displays:
Read and change all your data on the websites you visit Display notifications
-
Click Add.
-
Verify you have version 2.0 of Page Redder now installed.
- Copy the content from
manifest2.json
intomanifest.json
and save the file. This adds new manifest permissions ofwebRequestBlocking
,storage
, along with a new content_script. - Click Pack Extension.
- Select the source folder.
- Click Browse next to the Private key option and select the .pem file from your desktop.
- Click Pack Extension.
- Drag and drop the .crx file into the Chrome extensions page to install.
- Verify you have version 2.1 of Page Redder now installed with NO warning displayed.
-
Copy the content from
manifest3.json
intomanifest.json
and save the file. This adds new manifest permission ofprivacy
. -
Click Pack Extension.
-
Select the source folder.
-
Click Browse next to the Private key option and select the .pem file from your desktop.
-
Click Pack Extension.
-
Drag and drop the .crx file into the Chrome extensions page to install.
-
Confirm a warning displays saying the extension has been disabled because it requires more permissions:
Read and change all your data on the websites you visit Display notifications Change your privacy-related settings
Adding the new permissions webRequestBlocking
and storage
did NOT trigger a permission update warning. Nor did adding the second content script. However, adding the privacy
permission triggers a warning.