diff --git a/theme/javascript/utils/sharing.js b/theme/javascript/utils/sharing.js index caf97fbc4..4889b407a 100755 --- a/theme/javascript/utils/sharing.js +++ b/theme/javascript/utils/sharing.js @@ -13,6 +13,9 @@ define([ }, "google-plus": function($el) { window.open("https://plus.google.com/share?url="+encodeURIComponent(url)) + }, + "weibo": function($el) { + window.open("http://service.weibo.com/share/share.php?content=utf-8&url="+encodeURIComponent(url)+"&title="+encodeURIComponent(title)) } }; @@ -30,4 +33,4 @@ define([ return { init: init }; -}); \ No newline at end of file +}); diff --git a/theme/templates/includes/book/header.html b/theme/templates/includes/book/header.html index 5be0de381..9b36af8b2 100644 --- a/theme/templates/includes/book/header.html +++ b/theme/templates/includes/book/header.html @@ -21,6 +21,9 @@ {% if options.links.sharing.twitter !== false %} {% endif %} + {% if options.links.sharing.weibo === true %} + + {% endif %}