I am building a chrome app, which will simply open a link, for example "http://www.cnn.com/" in a new tab in chrome.
I have the following code in my manifest.json
{
"manifest_version": 2,
"name": "CNN",
"version": "2.1",
"permissions": ["webview", "pointerLock", "geolocation", "videoCapture"],
"app": {
"background": {
"scripts": ["main.js"]
}
}
}
And this is what i have in main.js:
chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create('http://www.cnn.com/', {
});
});
I have also tried,
chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create({ "url": "http://cloudsupport.neonova.net/home" });
});
as well as:
chrome.app.runtime.onLaunched.addListener(function(tab) {
chrome.app.tab.create({ "url": "http://cloudsupport.neonova.net/home" });
});
PLease help.
Thank you