如何在浏览器扩展中使用本地JSON?
我迷失了不可思议的浏览器扩展名。我正在做一个与龙有关的。通常,我只会使用FS,但这不是一个选择,因为它不是节点。
我的浏览器扩展文件夹只有三个文件:subtest.json
,content-script.js
和Dragons.json
。我正在用content-script.js
进行扩展,并且它正在游泳,但是现在我想从并写入Dragons.json.json
。我的扩展名不会出版或用于任何其他用户,而只能使用我。如何访问此文件?我并不是要读取用户的文件,也不是任何外部在线文件,而只是存储在扩展程序文件夹中的文件。
I'm incredibly lost and new to browser extensions. I am making one related to dragons. Normally I would just use fs but this isn't an option since it's not node.
My browser extension folder has only three files: manifest.json
, content-script.js
, and dragons.json
. I am making the extension in content-script.js
and it's going swimmingly, but now I would like to read from and write to dragons.json
. My extension will not be published or used for any other users, only me. How can I access this file? I am not trying to read the USER'S files, nor any external online files, just the files that are stored in the extension's folder.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论