'你好世界' chrome扩展每次打开需要2秒钟

时间:2015-10-14 14:15:50

标签: google-chrome google-chrome-extension google-chrome-app

我制作了一个非常基本的Google Chrome扩展程序。它所做的一切基本上是打开一个h1 hello世界的小html弹出窗口。但是,每次我尝试打开它时,打开弹出窗口需要将近2秒钟。我是一台体面的笔记本电脑,配备第四代i5和SSD,所以这不应该发生。此外,像pushbullet和lastpass这样的其他扩展程序,比我的代码更复杂,打开弹出窗口的时间更短。

我认为这是因为我将其作为未打包的扩展程序运行,但即使打包到crx文件后,打开弹出窗口仍需要1-2秒。我是否缺少一些正确优化的东西,以便它几乎立即打开?这是我的代码

的manifest.json

{
    "manifest_version": 2,

    "name": "Hello World",
    "description": "Insert Description Here",
    "version": "1.0",

    "browser_action": {
        "default_icon": "icon.png",
        "default_popup": "app/index.html",
        "default_title": "Hello World"
    },
    "permissions": [
    "activeTab",
    "https://ajax.googleapis.com/"
  ]
}

的index.html

<!doctype html>
<html>
<head>
    <title>KeePass Companion</title>
</head>
<body>
<h1>hello world</h1>
</body>
</html>

0 个答案:

没有答案