当我共享一个页面时,addthis在我的共享URL之后用哈希(#)创建一些数据/信息 - 我如何配置addthis以便它不会在我要分享的URL中创建哈希数据?
例如,addthis使这些,
http://mywebsite.com/#.Ufs8RtZRjpU.facebook
http://mywebsite.com/#.Ufs8oc2zPtQ.twitter
我在追求,
http://mywebsite.com/
http://mywebsite.com/
有可能吗?
修改
<!-- AddThis Button BEGIN -->
<script type="text/javascript">var addthis_config = { pubid: "lauthiamkok", data_track_addressbar:false };</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=lauthiamkok"></script>
<!-- AddThis Button END -->
<script type="text/javascript">
var addthis_config = addthis_config||{};
addthis_config.data_track_addressbar = false;
</script>
试过这个但是行不通。多年来使用它仍然是一种痛苦!
答案 0 :(得分:6)
答案 1 :(得分:1)
我发现了这个:http://support.addthis.com/customer/portal/questions/352733-how-to-remove-hash-from-url-
<script type="text/javascript">
var addthis_config = addthis_config||{};
addthis_config.data_track_addressbar = false;
</script>
好的尝试移动小部件上方的add_config行
<script type="text/javascript">
var addthis_config = addthis_config||{};
addthis_config.data_track_addressbar = false;
</script>
<!-- AddThis Button BEGIN -->
<script type="text/javascript">var addthis_config = { pubid: "lauthiamkok", data_track_addressbar:false };</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=lauthiamkok"></script>
<!-- AddThis Button END -->
答案 2 :(得分:1)
我已经创建了一个JavaScript函数并在加载时使用它....
function onloader() {
var v = window.location.href;
v = v.replace(/\#.*/, '');
window.location.href.replace = v;
}
$(window).load(function () {
onloader();
});
这对我有用...... :)希望每个人都能工作:D