Skip to main content

What permissions in browser extension manifest ?

  

What permissions should be declared when creating a browser extension manifest ? When in a browser extension's manifest file, in the section  "permissions" , defines what browser resources and features the extension needs access to? Add the permissions are necessary for the extension to perform certain tasks, such as accessing the active tab, storing data, or executing scripts on web pages.

Here is a list of all available permissions that can be declared in a browser extension manifest file:

  1. activeTab 
    • Access the current tab by clicking the extension icon.
  2. alarms 
    • Allows you to create, modify, and delete alarms.
  3. background
    • Allows scripts to run in the background.
  4. bookmarks
    • Access to browser bookmarks.
  5. browsingData
    • Allows you to clear browsing data.
  6. clipboardRead
    • Read access to clipboard contents.
  7. clipboardWrite
    • Allows you to save data to the clipboard.
  8. contentSettings
    • Manage content settings.
  9. contextMenus
    • Creating custom context menus.
  10. cookies
    • Access to website cookies.
  11. debugger
    • Allows you to debug web pages.
  12. declarativeContent 
    • Allows you to declaratively modify the content of pages.
  13. declarativeNetRequest
    • Allows declarative filtering and modification of network requests.
  14. downloads
    • Manage file downloads.
  15. enterprise.deviceAttributes
    •  Access to device attributes in an enterprise environment.
  16. enterprise.hardwarePlatform 
    • Access to hardware platform information in an enterprise environment.
  17. enterprise.networkingAttributes 
    • Access to network attributes in a corporate environment.
  18. enterprise.platformKeys 
    • Access to platform keys in a corporate environment.
  19. experimental
    • Access to experimental APIs.
  20. fileBrowserHandler
    • Allows extensions to handle files in the file manager.
  21. fileSystemProvider
    • Allows extensions to provide filesystems.
  22. fontSettings
    • Manage font settings.
  23. gcm
    • Enables the use of Google Cloud Messaging.
  24. geolocation
    • Access to device location.
  25. history
    • Access to browsing history.
  26. identity 
    • Enables user authentication.
  27. idle
    • Allows detection of user idle state.
  28. management 
    • Managing other extensions.
  29. nativeMessaging 
    • Enables communication with native applications.
  30. notifications 
    • Allows you to display notifications.
  31. pageCapture 
    • Allows you to capture the content of pages.
  32. platformKeys 
    • Access to platform keys.
  33. power 
    • Allows you to manage the device's power status.
  34. printerProvider 
    • Allows extensions to provide printers.
  35. privacy 
    • Manage your privacy settings.
  36. proxy 
    • Allows you to manage proxy settings.
  37. scripting 
    • Allows you to inject scripts into websites.
  38. search 
    • Allows you to manage search engines.
  39. sessions 
    • Access to browser sessions.
  40. storage 
    • Allows data to be stored in the browser's local memory.
  41. system.cpu 
    • Access to device processor information.
  42. system.display 
    • Access information about device displays.
  43. system.memory 
    • Access to device memory information.
  44. system.storage
    • Access to device storage information.
  45. tabCapture 
    • Allows you to capture the contents of cards.
  46. tabGroups 
    • Managing card groups.
  47. tabs 
    • Access to browser tabs.
  48. topSites 
    • Access to your most visited pages.
  49. tts 
    • Enables the use of text-to-speech functionality.
  50. ttsEngine 
    • Enables the creation of text-to-speech engines.
  51. unlimitedStorage
    • Allows unlimited data storage.
  52. vpnProvider
    • Allows extensions to provide VPN services.
  53. wallpaper
    • Allows you to manage wallpapers.
  54. webNavigation
    • Allows you to monitor and control browser navigation.
  55. webRequest
    • Allows you to monitor and modify network requests.
  56. webRequestBlocking
    • Allows you to block network requests.
Only add permissions that are necessary for the extension to work .

Enter the permissions  between brackets [] syntax to create the code     

             "permissions": ["Permission1", "Permission2", "Permission3", "Permission4"]

place the code anywhere in the    manifest.json file

Example of a section    "permissions"   in a file      manifest.json   :

{
  "manifest_version": 3,
  "name": "Przykładowe Rozszerzenie",
  "version": "1.0",
  "permissions": [
    "activeTab",
    "storage",
    "scripting",
    "tabs",
    "webNavigation",
    "cookies"
  ],
  "background": {
    "service_worker": "background.js"
  },
  "action": {
    "default_popup": "popup.html",
    "default_icon": {
      "16": "icon.png",
      "48": "icon.png",
      "128": "icon.png"
    }
  }
}

What permissions to add?

The permissions you choose depend on the features you want to implement in your extension. For example:

  • If you want the extension to be able to store data, add "storage".
  • If you need access to your current tab, add "activeTab".
  • If you want to inject scripts into your pages, add "scripting".

Be sure to only add permissions that are necessary for your extension to function to minimize potential security risks and increase user trust .

Comments

Popular posts from this blog

How to disable mouse acceleration using PowerShell ?

  To disable mouse acceleration using PowerShell, you can use the following script.  !Changing registry settings via PowerShell script will affect all pointing devices that use those settings! This script changes registry settings to disable mouse acceleration: Open Notepad and paste the code below: New-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseSpeed" -Value "0" -PropertyType String -Force New-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseThreshold1" -Value "0" -PropertyType String -Force New-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseThreshold2" -Value "0" -PropertyType String -Force This PowerShell script does the following: Registry path  :    -Path "HKCU:\Control Panel\Mouse"   Specifies the location in the registry where the property will be added or modified. In this case, it is the registry key for the mouse s...

How to create a certificate using wampserver and openssl ?

cmd.exe the path may vary depending on your wamp installation cont/ cd C:\wamp64\bin\apache\apache2.4.54.2\bin cmd command to generate key edit key name    "certificate" openssl genrsa -out   certificate .key 2048 create folders    C:\Apache24\conf   copy the file " openssl.cnf " from the folder   C:\wamp64\bin\apache\apache2.4.54.2\bin   to the   C:\Apache24\conf  folder   cmd command to generate pre-certificate edit key and certificate name    "certificate" openssl req -new -key   certificate .key -out   certificate .csr after entering the command, complete the certificate data step by step Country Name (2 letter code): PL State or Province Name (full name): Province Locality Name (eg, city): City Organization Name (eg, company): Company Name Organizational Unit Name (eg, section): Department Common Name (eg server FQDN or YOUR name): yourdomain.pl Email Address: youremail@domain.p...

How to use NetStat cmd windows tool in PHP ?

Netstat  (Network Statistics) is a command-line tool that provides information about network connections, routing paths, interface statistics, and other aspects of the network. It is used to diagnose network problems and monitor network activity. Netstat Features Viewing active connections  : Netstat shows a list of all active TCP, UDP, and UNIX connections. Port Information  : You can get information about open ports and those that are listening. Protocol Statistics  : Netstat provides statistics for various protocols like TCP, UDP, ICMP. Routing Tables  : The tool shows the routing table, which is useful for analyzing the routes of packets in the network. Network Interfaces  : Netstat displays statistics for network interfaces, such as the number of packets sent and received. Netstat Usage Examples Displaying all connections and ports  : netstat -a Display only TCP connections  : netstat -at Display only UDP connections  : netstat -au Displ...

What is CerUtil in Windows ?

    The  CertUtil     command       is a versatile command-line tool used in Windows systems to manage certificate information. It is part of Certificate Services and allows you to perform various certificate-related tasks, such as: Making a backup:  It is always a good idea to make a backup of your current configuration before making any changes. You can use the command   certutil -backup  to make a backup. To back up Certificate Authority (CA) components using   CertUtil command  , you can use the following command: Creating a backup  : certutil -backupDB <path to backup folder> certutil -backupKey <path to backup folder> certutil -backupDB   creates a backup of the CA database. certutil -backupKey   creates a backup of CA private keys. Make sure you provide the correct path to the folder where you want to store your backups. Restoring a backup  : certutil -restoreDB <pa...

How to create a browser in codeblocks ?

Creating a full-fledged web browser is a complex task that requires advanced programming knowledge. Below, I’ll give you a general outline of how you can start building a simple program that can display the contents of a web page in an application window. Step 1:      Selecting the Graphics Library GTK+:    A popular GUI library offering a wide range of widgets and easy integration with various operating systems. Qt:    A powerful library, often used in commercial applications, but requiring more complex configuration. wxWidgets:    A cross-platform library offering native look and feel on different systems. Step 2:      Selecting a Network Support Library cURL:    A library for retrieving data from HTTP servers. libcurl:    A C++ version of cURL, offering a more object-oriented API. Step 3: Basic Program Structure Main Window:    Creates the main application window using the selected graphics lib...

How create browser extension ?

    Creating an extension for a browser like Google Chrome or Microsoft Edge is a process that can be broken down into a few steps. Here is the basic procedure: 1.  Configuring the extension folder and manifest file Create a new folder   on your computer where you will store all the files related to the extension. You can name it something like "MyFirstExtension". Add the file   manifest.json  to this folder. The manifest file contains metadata about the extension, such as name, version, description, and required permissions. Sample code for the file  manifest.json looks like this: { "manifest_version" : 3 , "name" : "My First Chrome Extension" , "version" : "1.0" , "description" : "A simple Chrome extension tutorial" , "icons" : { "48" : "icon.png" } , "permissions" : [ "tabs" , "activeTab" , "scripting...

Quickly change the owner in file details in Windows

  Quickly change the owner in file details in Windows .       The example below shows an element in a file that changes after the configuration is changed.       The item is highlighted in blue.   Below is the configuration. Right click on START in Windows. Run. In the search box type: netplwiz. And then OK. The following window should open .   Select the user and then select properties. The following window should appear.     In the username field, enter the new username, i.e. the owner of the files. Confirm, OK. OK. After everything, it will restart the computer. This is necessary.