我希望能够在我的所有网站页面上的stumbleupon按钮,但始终有“绊脚石”我的主页。如何将此功能添加到Button中?
,Stumbleupon给我的是:
< !--把这个标签放在你想让su徽章呈现的地方-->
< su:badge layout="5" >< /su:badge >< !--把这个片段放在适当的地方->
< script type="text/javascript"><br>
(function() {
var li = document.createElement('script'); li.type = 'text/javascript'; li.async = true;
li.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + '//platform.stumbleupon.com/1/widgets.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(li, s);
})();
< /script>这是我的网站fairivy.com
谢谢!
发布于 2013-04-17 06:09:55
在要显示徽章的地方,请从以下内容编辑代码:
<su:badge layout="5"></su:badge>对此:
<su:badge layout="5" location="http://www.fairivy.com/"></su:badge>发布于 2012-11-06 16:17:52
您可能必须自定义意外提供的JS脚本,尝试在js中更改这一行,并将其托管在您自己的网站上:
if(this.type=='follow')
return scheme+'www.'+ this.domain+ followBase+'?id='+ this.ref+'&l='+ this.layout;else if(this.type=='bestof')
return scheme+'www.'+ this.domain+ bestofBase+'?'+ this.request.join('&')+'&l='+ this.layout+'&title='+ encodeURIComponent(this.title);如果使用此解决方案,则可能只能使用主域创建单独的.js。
您还需要将该行更改为您的自定义位置:
'//platform.stumbleupon.com/1/widgets.js'https://stackoverflow.com/questions/13254926
复制相似问题