我如何在greasemonkey中使用最新的谷歌可视化API?
试图让谷歌可视化API在greasemonkey(firefox)中工作,我尝试只使用:
// @require http://www.google.com/jsapi
google.visualization未定义
但后来我得到一个错误:添加后
// google.load('visualization', '1', {packages: ['table']});
:我得到错误:$未定义
我需要错误的东西吗?请帮忙。
预先感谢有用的答案!
trying to get google visualisation API to work in greasemonkey (firefox) i tried to just use:
// @require http://www.google.com/jsapi
but then i get an Error: google.visualization is undefined
after adding:
// google.load('visualization', '1', {packages: ['table']});
i get the Error: $ is not defined
am i requiring the wrong thing? please help.
thanks in advance for useful answers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对 Google Maps API 有一个类似的问题。
就我而言,我必须将 API 附加到页面
,并且
google
必须被称为unsafeWindow.google
,所以我添加了google = unsafeWindow.google
也是如此。在此处查看完整的代码和说明:如何使用 google 地图 api 和 Greasemonkey 来读取地址表并跟踪路线?
i had a similar question concerning the Google Maps API.
in my case, i had to append the API to the page with
and
google
had to be called asunsafeWindow.google
, so i addedgoogle = unsafeWindow.google
as well.check the full code and explanation here: how to use the google maps api with greasemonkey to read a table of addresses and trace the route?