Hi I am trying to create a chrome extenstion,For making my app to extenstion I am following this steps,
1.Go to chrome option -> More tools -> Extension.
2.I selected the developer mode in that window.
3.I selected the unpacked extention then selected my app.
4.I clicked Pack extension.
In my application I have few html pages,CSS,JS and manifest file and background.js.
manifest file
{
"name": "...",
"description": "........",
"manifest_version": 2,
"minimum_chrome_version": "23",
"version": "0.1.1",
"offline_enabled": true,
"icons": {
"16": "sample.png"
},
"permissions": [
"storage","tabs","","webview"
],
"app": {
"background": {
"scripts": ["background.js"]
}
}
}
background.js
chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create('login.html', {
id: 'main',
bounds: { width: 1024, height: 768 }
});
});
While Including permissions for tab I am getting th e following warning,
There were warnings when trying to install this extension:
'tabs' is only allowed for extensions and legacy packaged apps, but this is a packaged app.
My app is not considered as a extension.And I am trying this for page navigation.
I usually use window.location.href="sample.html" in jquery. For this I am getting a error in my chrome extension,
Use blank _target
Then I tried using this line of codes,
function clickHandler(e){
chrome.tabs.update({url:"service1.html"});
window.close();
}
document.addEventListener('DOMContentLoaded',function(){
document.getElementById('click-me').addEventListener('click',clickHandler);
});
This snippent of code is also not working.Can some one please help me to make my app a extension and help me in page navigation.Thanks in advance.