Search code examples
google-chrome-extensionmanifest

Why does my chrome extension ask for history permissions?


In my manifest.json file, I have nothing explicitly listed for reading a user's history, however, this warning comes up when you try to install the extension.

Here is my manifest file:

{
  "manifest_version": 2,

  "name": "QueueTube for YouTube!", 
  "short_name": "QueueTube", 
  "description": "Search YouTube without stopping the video, and make your own playlists!",
  "version": "1.5",
  "author": "Dara Javaherian",

  "permissions": ["tabs", "*://*.youtube.com/*"],

  "background": {
    "persistent":true,
    "scripts": [
      "bg/socket.io.js",
      "bg/background.js"
    ]
  },
  "icons": {
    "128": "icons/youtube-128.png"
  },
  "browser_action": {
    "default_icon": "icons/icon.png",
    "default_popup": "popup/popup.html"
  },
  "web_accessible_resources": [
    "spinner.gif"
  ],
  "content_scripts" : [{
    "matches" : 
      ["https://www.youtube.com/*",
      "http://www.youtube.com/*"],
    "js" : [
      "js/jquery.js",
      "js/inject.js"],
    "css" : ["styles/styles.css"]
  }]
}

Does anyone know why this permission is showing up?


Solution

  • This is the standard warning for the "tabs" permission.

    It allows you to query, and be notified of changes, to URLs of all tabs. This allows you to spy on the user's history in real time - even if you don't have access to the browser's own history log.

    Note that "tabs" permission is not required in most cases. Providing access to URLs is basically the only reason to include it. You can use most of the tabs API without it, and can get access to current tab without warning using the "activeTab" permission.