Google 小工具测试简介

发布于 2024-10-08 20:50:47 字数 348 浏览 0 评论 0原文

我正在尝试创建一个简单的谷歌小工具,但很快就遇到了麻烦。我已经从头到尾阅读了入门指南,但感觉我仍然缺少一些东西。

从他们提供的 Hello World 小工具开始,我如何开始编辑和测试?我正在使用带有预览选项卡的 Google 小工具编辑器。这适用于简单的 html,但我嵌入的任何 javascript(例如“警报”)都不起作用。

我可以发布该小工具并将其添加到 iGoogle。当我这样做时,我的嵌入 JavaScript 就会起作用。然而,幕后似乎存在大量缓存和延迟。现在这个编辑、上传、发布、调试的过程是相当痛苦的。我在这里遗漏了一些明显的东西吗?开发和测试小工具的“正确”方法是什么?有没有一个程序可以在我的机器上运行小工具代码而无需上网?

I'm trying to create a simple google gadget and am encountering trouble right out the door. I've read the getting started guide top to bottom and feel like i'm still missing something.

Starting with the Hello World gadget they have provided, how do I begin editing and testing? I'm using the Google Gadget Editor with the preview tab. This works for simple html, but any javascript (such as an "alert") I embed doesn't work.

I can publish the gadget and add it to iGoogle. When I do this, my embeded javascript works. However there seems to be a good bit of caching and latency going on behind the scenes. Right now this process of editing, uploading, publishing, debugging is quite painful. Am I missing something obvious here? What is the "correct" way to develop and test a gadget? Is there a program that can run gadget code on my machine without having to go online?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

丿*梦醉红颜 2024-10-15 20:50:48

啊,编辑 Google 小工具的乐趣。

根据我的经验,Google Gadget 编辑器有很多问题。这可能是您遇到的 Javascript 问题,请尝试切换浏览器。

另外,要禁用缓存:

http://www.google.com/ig/directory?type=gadgets&url=www.google.com/ig/modules/developer.xml

Ah, the joys of editing a Google Gadget.

From my experience the Google Gadget editor is VERY buggy. So that may be the Javascript issue you are having, try switching browsers.

Also, to disable caching:

http://www.google.com/ig/directory?type=gadgets&url=www.google.com/ig/modules/developer.xml

随梦而飞# 2024-10-15 20:50:48

据我所知,答案似乎是“否”。我还遭受了您提到的痛苦的延迟:一个代码/调试周期很容易需要 10 分钟等待小工具更新到我的最新代码。

我希望有人给我打分并提供“是”的答案。

The answer appears to be "No" as far as I can tell. I have also suffered the painful latency you mention: one code/debug cycle can easily take 10 minutes of waiting for the gadget to update to my latest code.

I hope someone marks me down and provides a "Yes" answer.

后知后觉 2024-10-15 20:50:48

尝试将查询字符串附加到您的小工具 URL,然后将其添加到您的 Gmail 或 iGoogle 页面。每次对小工具进行更改时,请使用不同的查询参数。例如:

www.mycompany.com/gadgets/main.xml?q=1234

Google 大约每小时刷新一次缓存。因此,添加查询字符串将强制它立即刷新小工具。

Try appending a query string to your gadget URL and then add it to your gmail or iGoogle page. Use a different query parameter every time you make changes to your gadget. Like for example:

www.mycompany.com/gadgets/main.xml?q=1234

Google refreshes the cache every hour or so. So, adding a query string will force it to refresh the gadget immediately.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文