小编Kob*_*ior的帖子

完全失去了如何保存扩展弹出窗口内容

每次打开新链接或"远离"点击它时,我都会失去如何使弹出窗口的添加内容不会消失.我已经阅读了有关内容脚本,后台脚本等的内容,但我并不知道如何将其实现到我自己的源代码中.下面是我的popup.html,popup.js和我的manifest.js文件.

{
    "manifest_version": 2,
    "name": "URL_save",
    "description": "This extension saves an URL and renames the title to the user's wishes and hyperlink the title.",
    "version": "0.1",

    "browser_action": {
        "default_icon": "/img/icon.png",
        "default_popup": "popup.html",
        "default_title": "See your saved websites!"
    },

    "permissions": [
        "tabs"
    ]
}
Run Code Online (Sandbox Code Playgroud)

popup html:

<html>
  <head>
    <title>Your articles</title>
    <link href="/css/style.css" rel="stylesheet"/>
    <script src="/js/underscore-min.js"></script>
    <script src="/js/popup.js"></script>
  </head>
  <body>
    <div id="div">No content yet! Click the button to add the link of the current website!</div> …
Run Code Online (Sandbox Code Playgroud)

html javascript google-chrome google-chrome-extension firefox-addon-webextensions

3
推荐指数
1
解决办法
4080
查看次数