如何使用谷歌代码
我使用 openlike (openlike.org),但该网站似乎暂时关闭。我通常会使用这样的东西:
<script type="text/javascript" src="http://openlike.org/v1/openlike.js"></script>
<script type="text/javascript">OPENLIKE.Widget()</script>
但这不起作用。我在谷歌代码上找到了这个项目,我想知道如何实现完全相同的东西,但是来自谷歌?谷歌代码和谷歌CDN完全不同吗?即我不能只更改该 javascript 文件的 URL?
Google 代码项目:http://code. google.com/p/openlike/source/browse/#svn%2Ftrunk%2Fv1%253Fstate%253Dclose
感谢您的帮助,
戴夫
I use openlike (openlike.org) but the site seems to be temporarily down. I would normally use something like this:
<script type="text/javascript" src="http://openlike.org/v1/openlike.js"></script>
<script type="text/javascript">OPENLIKE.Widget()</script>
But that isn't working. I've found the project on google code, I was wondering how I implement exactly the same thing, but from Google? Is Google code completely different from the google cdn? I.e. I can't just change the URL of that javascript file?
Google code project: http://code.google.com/p/openlike/source/browse/#svn%2Ftrunk%2Fv1%253Fstate%253Dclosed
Thanks for any help,
Dave
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从发布的链接中,如果您点击“openlike.js”,然后点击“查看原始文件”,您将得到以下结果:
http://openlike.googlecode.com/svn/trunk/v1/openlike.js
您当然可以链接到此文件。这是我尝试过的,它工作得很好:
我对谷歌代码和 svn 的了解不够,无法告诉你该文件是否会永远存在并且不会改变。我怀疑它是否打算用作 CDN。但当 openlike.org 暂时关闭时,它可能足够好使用。
From the link posted, if you click on "openlike.js" and then "View raw file" you'll get exactly that:
http://openlike.googlecode.com/svn/trunk/v1/openlike.js
You can certainly link to this file. Here's what I tried and it worked fine:
I don't know enough about google code and svn to tell you if that file will be there forever and won't change. I doubt that it's intended to be used a CDN. But it's probably good enough to use while openlike.org is down temporarily.