我怎样才能将数据从Chrome扩展到本地主机? [英] How can i send data from chrome extension to localhost?

查看:163
本文介绍了我怎样才能将数据从Chrome扩展到本地主机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个 google chrome 扩展程序来阅读我的浏览器历史记录。所有的作品完成。现在我愿意将检索到的历史数据发送到我的本地主机服务器。这可能吗?这个怎么做?任何人都可以帮助我。



预先致谢。

基本步骤(包含在以下链接中的示例代码)将会是:
$ b


  1. 将您的本地服务器url添加到 permissions 字段位于 manifest.json

  2. 使用 Ajax Websocket Nativemessaging (您需要 nativeMessaging 权限)或任何其他通信方法在扩展和本地服务器之间交换数据。


I am creating a google chrome extension to read my History of browser. All works done. Now i am willing to send the retrieved history data to my localhost server. Is this possible? How to do this? Please anyone help me.

Thanks in advance.

解决方案

The basic steps (sample code contained in the following links) would be:

  1. Add your local server url to permissions field in manifest.json
  2. Use Ajax, Websocket, Nativemessaging (You would need nativeMessaging permission instead), or any other communication method to exchange data between extension and your local server.

这篇关于我怎样才能将数据从Chrome扩展到本地主机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆