Change for getting url from key

This commit is contained in:
Christophe Vilayphiou committed 2012-08-08 11:04:19 +08:00
1 parent 6cfdf0f25a
commit a03d1ad10b
5 files changed
+8 -7

No files matched your search

@@ -9,7 +9,6 @@ window.SocialShareButton =
img = encodeURIComponent($(el).parent().data("img"))
fb_url = encodeURIComponent($(el).parent().data("fb_url"))
url = encodeURIComponent(location.href)
fb_full_url = encodeURIComponent("#{fb_url}?orig_host=#{location.host}&orig_path=#{location.pathname}")
switch site
when "weibo"
SocialShareButton.openUrl("http://v.t.sina.com.cn/share/share.php?url=#{url}&pic=#{img}&title=#{title}&content=utf-8")
@@ -18,7 +17,7 @@ window.SocialShareButton =
when "douban"
SocialShareButton.openUrl("http://www.douban.com/recommend/?url=#{url}&title=#{title}&image=#{img}")
when "facebook"
SocialShareButton.openUrl("http://www.facebook.com/sharer.php?t=#{title}&u=#{fb_full_url}")
SocialShareButton.openUrl("http://www.facebook.com/sharer.php?t=#{title}&u=#{fb_url}")
when "qq"
SocialShareButton.openUrl("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=#{url}&title=#{title}&pics=#{img}")
when "tqq"