如何使用谷歌代码

发布于 2024-12-12 07:58:23 字数 641 浏览 0 评论 0原文

我使用 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 技术交流群。

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

发布评论

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

评论(1

萌无敌 2024-12-19 07:58:23

从发布的链接中,如果您点击“openlike.js”,然后点击“查看原始文件”,您将得到以下结果:

http://openlike.googlecode.com/svn/trunk/v1/openlike.js

您当然可以链接到此文件。这是我尝试过的,它工作得很好:

<script type="text/javascript" src="http://openlike.googlecode.com/svn/trunk/v1/openlike.js" ></script>
<script type="text/javascript" >
    console.log(OPENLIKE);
</script>

我对谷歌代码和 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:

<script type="text/javascript" src="http://openlike.googlecode.com/svn/trunk/v1/openlike.js" ></script>
<script type="text/javascript" >
    console.log(OPENLIKE);
</script>

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.

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