将用户带到卸载chrome打包应用程序的链接

时间:2016-11-09 21:44:16

标签: javascript google-chrome google-chrome-app

我正在开发一个chrome打包的应用程序,我正在尝试设置用于卸载应用程序的URL。到目前为止,我在应用程序的背景Javascript(或主要)上有这一行:

chrome.runtime.setUninstallURL(goo.gl/forms/qo8OF2w9pLLyHloa2)

但卸载时什么也没做?任何帮助都会被爱!这是我的剧本,也是完整的。

chrome.app.runtime.onLaunched.addListener(function() {
    chrome.app.window.create('popup.html', {
    'outerBounds': {
      'width': 640,
      'height': 692
    },
    "resizable": false,
    "frame": {
        color: "#ffffff"
    },
  });
});
chrome.runtime.onUpdateAvailable.addListener(function(details) {
  console.log("updating to version " + details.version);
  chrome.runtime.reload();
});

chrome.runtime.requestUpdateCheck(function(status) {
  if (status == "update_available") {
    chrome.runtime.reload();
  } else if (status == "no_update") {
    console.log("no update found");
  }
});

chrome.runtime.setUninstallURL(goo.gl/forms/qo8OF2w9pLLyHloa2)

这也是我的清单

{
"name": "Meme Music Board",
"short_name": "Meme Music Board",
"description": "All of your meme songs in one song board. 100+ Songs! You deserve it ;)",
"version":"2.6.4",
"manifest_version": 2,
"author": "Banana Man Development",
"offline_enabled": true,
"app": {
"background": {
  "scripts": ["background.js"]
    }
  },
"icons": { "16": "icons/icon16.png", "48": "icons/icon48.png", "128": "icons/icon128.png" }
}

1 个答案:

答案 0 :(得分:1)

documentation中声明

  

此网址必须包含http:或https:scheme。

尝试将http://添加到您网址的正面,您应该很高兴。

还要确保将网址放在单引号中,这就是方法所需要的。