腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(1221)
视频
沙龙
1
回答
获取本地存储值到内容脚本[Chrome扩展]的简单方法
、
、
由于它不是直接可用的,所以我通过
chrome.runtime.sendMessage
完成了它,但是我有几个值,如下所示。var username, apikey, openexchange, currency, locale; username = response.data;
chrome.runtime.s
浏览 11
提问于2015-02-25
得票数 0
回答已采纳
2
回答
将URL发送到后台页面
、
内容脚本:var linkX = kom[0];
chrome.runtime.sendMessage
浏览 0
提问于2017-03-18
得票数 0
2
回答
Chrome扩展-将变量从内容脚本发送到事件页面
、
、
、
我想要一个事件页面从发送消息的内容脚本中获取一个变量。据我所知,我只能向事件页面发送一条简单的JSON消息,比如{greeting: "hello"}。我已经研究了JSON.stringify()以通过JSON消息发送变量,但我没有任何运气。
浏览 0
提问于2016-07-26
得票数 0
1
回答
无法在iframe中访问chrome.runtime
、
试图在
chrome.runtime.sendMessage
中访问iframe,但这表明
chrome.runtime.sendMessage
("
浏览 0
提问于2018-10-09
得票数 0
1
回答
没有响应Chrome扩展
、
、
我正在尝试从sendResponse获得响应到
chrome.runtime.sendMessage
,但它总是显示为未定义的,下面是我的代码: sendResponse({success: 'true'});}); 因此,当我传递sendResponse({success: true})时,应该在
chrome.runtime.sendMessage
浏览 4
提问于2016-05-26
得票数 0
回答已采纳
1
回答
Chrome扩展和Angular:我能把
chrome.runtime.sendMessage
变成一个同步函数吗?
、
、
、
我正在尝试运行
chrome.runtime.sendMessage
以从服务器获取信息。我使用这个信息来决定在我的chrome扩展中显示哪个页面。问题是
chrome.runtime.sendMessage
是一个异步函数,它与app.config不能很好地配合。有没有办法把
chrome.runtime.sendMessage
变成一个同步函数?stateProvider, $urlRouterProvider) { var user = rootRef.getAu
浏览 9
提问于2015-03-27
得票数 0
1
回答
“无法读取未定义的属性'sendMessage‘”会在一个调用中抛出,但在另一个调用中不会抛出(它们几乎是相邻的)
、
我正在做一个chrome扩展,一个
chrome.runtime.sendMessage
()调用是有问题的,而其他的调用是可以工作的;这很奇怪,因为“有问题”的调用和另一个是完全一样的,并且在离它只有5
chrome.runtime.sendMessage
(timeCount); //not problematic else if(msg == "NEED WATCHLIST") {
chrome.runTime.sendMessage
(timeCount); //thr
浏览 7
提问于2019-06-08
得票数 0
1
回答
从内容脚本向弹出脚本发送消息
、
、
、
、
我试图从我的内容脚本发送一条消息到我的弹出脚本,因为我需要在加载页面时使用弹出DOM,下面是我尝试过的: contentScript.js window.addEventListener("load", function() {
chrome.runtime.sendMessage
浏览 19
提问于2020-06-22
得票数 0
1
回答
chrome.runtime.onMessage.addListener未在创建的选项卡中注册
、
$(function(){
chrome.runtime.sendMessage
({titleelement in created tab
chrome.runtime.sendMessage
chrome.runtime.onMe
浏览 0
提问于2015-01-14
得票数 0
回答已采纳
1
回答
将当前网页的url显示为铬扩展名。
、
我试图在一个铬扩展名中显示当前网页的URL。我刚刚开始使用javascript和。{"version": "0.1","author": "!!!","icons": { "default_icon": "logo2.png
浏览 2
提问于2014-04-13
得票数 1
1
回答
在弹出窗口内从iframe向后台脚本发送消息
、
、
、
我有一个谷歌铬扩展,有弹出,其中包含和iframe。iframe指向域abc.com。有什么方法,我可以点击在iframe和发送一条消息到我的铬扩展名的背景脚本。我尝试将以下javascript代码添加到abc.com上的我的abc.com页面中。<script type="text/java
浏览 3
提问于2014-08-13
得票数 1
回答已采纳
1
回答
未定义TypeError:检测铬扩展时无法读取未定义属性的“get”
、
、
、
我们编写了一个chrome扩展,它通过本地消息传递从外部网页(部署在本地服务器tomcat中)调用。我们希望外部页面首先检测用户安装了chrome扩展,然后与扩展进行通信。这是扩展名清单文件:["http://*/*","management""externally_connectable":"matches": ["http://localhost:8080/test.j
浏览 2
提问于2015-12-20
得票数 0
3
回答
在对
chrome.runtime.sendMessage
()的单个函数调用中包含多条消息;
、
、
、
chrome.runtime.sendMessage
();
chrome.runtime.sendMessage
(message1);
chrome.runtime.sendMessage
(message2
浏览 10
提问于2014-03-26
得票数 0
1
回答
内容脚本不接收我发送的对象。
、
contentscript.js <-- give var <------------// contentscript.js
chrome.runtime.sendMessage
浏览 2
提问于2014-09-06
得票数 0
回答已采纳
1
回答
在safari扩展中通过Post/Dispatch消息传送JavaScript文件,如在chrome扩展中
、
、
通过
chrome.runtime.sendMessage
。
chrome.runtime.sendMessage
({我们可以在safari扩展中使用类似的东西吗?一个可以处理所有消息的后台文件?但是我们想要像Chrome(
chrome.runtime.sendMessage
)那样通过Post/Dispatch消息在JavaScript文件(加载全局/弹出Html文件)之间进行通信。
浏览 14
提问于2016-08-19
得票数 0
1
回答
为什么箭头函数不能在chrome扩展内容脚本中工作?
、
、
在我的chrome扩展的内容脚本中,以下代码不起作用: console.log("sending msg"); console.log("sending msg");
chrome.runtime.sendMessage
({ action: "myAction
浏览 1
提问于2021-02-11
得票数 0
回答已采纳
2
回答
如何接收来自BackgroundJS的消息并在ReactJS和Chrome扩展中更改状态?
、
extends React.Component { this.state = { }; func() { if (request.type == 'hello')
chrome.runtime.sendMessa
浏览 1
提问于2017-07-21
得票数 2
回答已采纳
1
回答
Chrome57.0.2987版中的
chrome.runtime.sendMessage
错误
、
、
我进行了调试,发现原因是
chrome.runtime.sendMessage
不工作。我在背景页面上发了一条消息我有一个听众(同样的背景页面)但是在运行
chrome.runtime.sendMessage
之后什么都没有发生。我找过了,但没什么问题。有人和我有同样的问题吗?谢谢
浏览 4
提问于2017-03-28
得票数 2
回答已采纳
2
回答
如何动态地将chrome扩展ID发送到网页以进行消息传递
、
、
在脚本中,我使用
chrome.runtime.sendMessage
成功地向后台脚本发送消息。然而,我有硬编码的extensionId。如何在网页中动态注入扩展id以向后台脚本发送消息?
chrome.runtime.sendMessage
(extensionIdHardCoded, { }, function(response) {});
浏览 2
提问于2015-12-22
得票数 2
回答已采纳
1
回答
chrome.runtime.sendmessage
不能在铬扩展中工作
、
但我觉得很好background.js接收chrome.runtime.onMessage.addListener和menifest.json
chrome.runtime.sendMessage
是它不起作用"content_scriptsdefault: return true;}
浏览 5
提问于2022-04-21
得票数 1
点击加载更多
相关
资讯
鲲圭插件登录方式完善
30分钟开发一款抓取网站图片资源的浏览器插件
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
即时通信 IM
活动推荐
运营活动
广告
关闭
领券