草庐IT

google-chrome-arc

全部标签

javascript - 如何在 Chrome 中以编程方式切换 Zurb Foundation 开关控件?

我想使用javascript动态切换ZurbFoundationSwitch控件的状态。这是默认的ZurbFondation开关:OffOn演示here.它们基于thisproject,我相信。当我尝试使用jquery更改开关的状态时:$('#d1').attr('checked','checked');$('#d').removeAttr('checked');//SwitchON$('#d').attr('checked','checked');$('#d1').removeAttr('checked');//SwitchOFF它在Firefox中有效,但在Chrome中无效。在C

javascript - 从 Chrome 扩展访问 iframe URL

我有一个扩展需要加载一个页面,该页面在其背景页面中有很多重定向。一旦该页面到达已知URL(https://website.com/index.php),iframe应将其src设置为about:blank。最终页面非常大,有大图片和所有不需要加载的东西,所以我没有附加到iframe的onload事件,而是将以下函数设置为100毫秒的时间间隔:functionupdate(){if(document.getElementsByTagName('iframe')[0].contentDocument.location.href=="https://website.com/index.php

javascript - Chrome 网上商店服务器拒绝带有 "Error : The manifest must define a version."的扩展

注意:这个问题是关于您在进行Chrome开发时使用的manifest.json的version属性。它看起来与下面关于manifest_version的问题类似,但事实并非如此。我真的很想从中吸取教训,但我失败了。NeedtoupdateChromeextensiontomanifestversion2ifnomanifestversionoriginallyspecified?--我目前正在做我的第一个Chrome扩展。强大、有趣、棒极了。除了一件让我烦恼的蠢事。我的Chrome扩展程序是开源的,所以你可以直接转到GitHub上的代码,这样你就可以立即看到我犯了一个愚蠢的错误http

javascript - Google Maps Marker Cluster示例

我正在寻找一个googlemapsmarker集群apiv3的基本示例。我已经看过这个例子了,但是我做不好。请帮我举一个用这些数据绘制集群的例子:varmacDoList=[{lat:49.00408,lng:2.56228,data:{drive:false,zip:93290,city:"TREMBLAY-EN-FRANCE"}},{lat:49.00308,lng:2.56219,data:{drive:false,zip:93290,city:"TREMBLAY-EN-FRANCE"}},{lat:48.93675,lng:2.35237,data:{drive:false,z

javascript - 仅在 Chrome 中格式错误的 RTCConfiguration

我正在使用WebRTC,但发现并非所有浏览器都支持它。但是,Chrome和Firefox确实支持它(在较新的版本中;我安装了最新版本),只要您具有某些变量的正确前缀即可。例如,我有以下用于PeerConnection的跨浏览器支持:varPeerConnection=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;现在应该是支持跨浏览器了,我有如下代码:varservers={iceservers:[{url:"stun:23.21.150.121"},{url:

javascript - Google+ 使用 JavaScript 登录——立即调用两次回调

我正在尝试按照Google+指南使用我自己的按钮启动Google+登录流程。关于回调函数,gapi.auth.signIn引用说(引用):"Afunctionintheglobalnamespace,whichiscalledwhenthesign-inbuttonisrenderedandalsocalledafterasign-inflowcompletes."出现Google登录对话框,要求我登录,但在与该对话框进行任何交互之前,回调被立即调用了两次。两次我都得到类似的authResult,error="immediate_failed",error_subtype="acces

javascript - 在 Google Apps 脚本中使用转译的 ES6 => ReferenceError : "SomeClass" is not defined

我正在尝试在Google电子表格(在script.google.com部分)中使用ES6。我是JavaScript的新手,也许错误是微不足道的......28/09:帖子的错误已更改,因为我只是使用GoogleApps脚本库名称(Logger),我切换到SomeClass。我正在寻找模块,因为我的声明不是很好我做了什么:创建了一个webpack项目创建了一个Logger类创建了一个main.js,我在其中导入了Logger类WebPack从我的main.js生成一个包我将bundle.js复制/粘贴到script.google上的捆绑文件中我尝试在script.google中运行测试,

javascript - 是否有 FF 等同于 chrome.declarativeContent.onPageChanged?

我正在将Chrome扩展程序移植到FirefoxWebExtensions,我一直在寻找chrome.declarativeContent.onPageChanged的解决方法。我的FFWebextension包含一个在某些网站上导航时必须显示的页面操作。但是,可用API中的所有监听器似乎都不允许这样做。特别是我试过:chrome.runtime.onInstalled.addListener(onChange);chrome.tabs.onCreated.addListener(onChange);chrome.tabs.onActivated.addListener(onChang

javascript - 在页面加载时在 chrome 扩展中运行 js 脚本

我需要构建一个操作dom的chrome扩展我正在学习一些教程,现在我有这个manifest.json:{"manifest_version":2,"name":"Gettingstartedexample","description":"ThisextensionshowsaGoogleImagesearchresultforthecurrentpage","version":"1.0","browser_action":{"default_icon":"icon.png","default_popup":"popup.html"},"permissions":["activeTab"

javascript - Google 日历 API 和 Node js - "googleAuth is not a constructor"问题

我正在尝试在Node上设置Google日历API,使用出现的Node.js快速入门here完成前3个步骤并运行我的quickstart.js以检查它是否有效(我从快速入门复制并粘贴)后,我收到以下错误:“类型错误:googlAuth不是构造函数”它指的是这行代码:varauth=newgoogleAuth();googleAuth是这样声明的:vargoogleAuth=require('google-auth-library');我在网上找不到任何解决方案。完整代码在上面第三步的链接中。提前致谢,阿萨夫。 最佳答案 版本已经改变,