完全不知道如何保存扩展弹出窗口内容 [英] Completely lost on how to save extension popup window content
本文介绍了完全不知道如何保存扩展弹出窗口内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对如何使弹出窗口中添加的内容不会在每次打开新链接或离开"时消失的方法感到非常困惑.我已经阅读了内容脚本、背景脚本等内容,但老实说我不知道如何将其实现到我自己的源代码中.下面是我的 popup.html、popup.js 和我的 manifest.js 文件.
{清单版本":2,"name": "URL_save","description": "此扩展程序保存一个 URL 并将标题重命名为用户的意愿并超链接标题.",版本":0.1",浏览器动作":{"default_icon": "/img/icon.png","default_popup": "popup.html","default_title": "查看您保存的网站!"},权限":[标签"]}
弹出 html:
<头><title>你的文章</title><link href="/css/style.css" rel="stylesheet"/><script src="/js/underscore-min.js"></script><script src="/js/popup.js"></script>头部><身体><div id="div">还没有内容!点击按钮添加当前网站的链接!</div><div><ul id="list"></ul></div><br/><button id="button">添加链接!</button>