0

i have this json file

{
  "manifest_version": 2,
  "name": "my app",
  "version": "1",
  "app": {
    "background": {
      "scripts": ["main.js"]
    }
  },
  "content_scripts": [
    {
      "css": ["css.css", "jquery-ui.css"],
      "js": ["jquery-1.5.2.js", "jquery-ui.min.js", "jquery.jqprint-0.3.js"]
    }
  ]
}

the main.js file

chrome.app.runtime.onLaunched.addListener(function() {
  chrome.app.window.create('index.html', {
    bounds: {
      width: 800,
      height: 800
    }
  });
});

the app installs in chrome extensions. it loads the index.html properly,the css loads fine but jquery is not working. what i am doing wrong here

thanks

user3743685
  • 3
  • 1
  • 3

1 Answers1

0

finally got it working. now using sandbox to execute all scripts

{
  "name": "test",
  "description": "test",
  "manifest_version": 2,
  "minimum_chrome_version": "23",
  "version": "1.0",
  "offline_enabled": true,
  "app": {
    "background": {
      "scripts": ["main.js"]
    }
  },
"sandbox": {
  "pages": ["index.html"]
},

  "permissions" : [
    "clipboardWrite"
  ],
  "icons": {
    "16": "128.png",
    "128": "128.png"
  }
}
user3743685
  • 3
  • 1
  • 3