What is wrong with this Chrome Extension manifest.json?

Discussion in 'Programming' started by Weirfire, Oct 2, 2012.

  1. #1
    Google have updated their Chrome browsers so that manifest_version 1 is no longer allowed which means that our previous Chrome Extension needs updating. I've updated everything to the code below but when I click on the icon.png to get the script executed it doesn't work. Can someone please take a look at the manifest below and tell me if everything looks okay?

    
    
    {
      "name": "POTool",
      "version": "1.0",
      "description": "Google spreadsheet -> Gmail transfer PO data",
      "permissions": [
        "tabs",
        "https://docs.google.com/*",
        "https://mail.google.com/*"
      ],
      "background": { 
    	"page": "background.html"
      },
      "browser_action": {
        "default_icon": "icon.png",
        "popup": "popup.html"
      },
      "content_scripts" : [
        {
          "matches": ["https://docs.google.com/spreadsheet/ccc?key=######KEY REMOVED#######",
                      "https://spreadsheets.google.com/*"],
          "js": ["content_script.js"]
        }
      ],
      "options_page": "options.html",
      "manifest_version": 2
      
    }
    
    Code (markup):

     
    Weirfire, Oct 2, 2012 IP