diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-10-05 13:53:19 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-10-05 13:53:19 +0200 |
commit | 376c68957f7c58f87de977047ac63936926e328e (patch) | |
tree | 2ced57f94e0b78a56f7aaffcee705abd2d367b5c /theme/javascript/utils/sharing.js | |
parent | 222ec8d4b9c9ee126ef477de7cf52412799a821d (diff) | |
download | gitbook-376c68957f7c58f87de977047ac63936926e328e.zip gitbook-376c68957f7c58f87de977047ac63936926e328e.tar.gz gitbook-376c68957f7c58f87de977047ac63936926e328e.tar.bz2 |
Remove sharing
Diffstat (limited to 'theme/javascript/utils/sharing.js')
-rwxr-xr-x | theme/javascript/utils/sharing.js | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/theme/javascript/utils/sharing.js b/theme/javascript/utils/sharing.js deleted file mode 100755 index a0cfb59..0000000 --- a/theme/javascript/utils/sharing.js +++ /dev/null @@ -1,39 +0,0 @@ -define([ - "jQuery" -], function($) { - var types = { - "twitter": function($el) { - window.open("http://twitter.com/home?status="+encodeURIComponent($("title").text()+" "+location.href)) - }, - "facebook": function($el) { - window.open("http://www.facebook.com/sharer/sharer.php?s=100&p[url]="+encodeURIComponent(location.href)) - }, - "google-plus": function($el) { - window.open("https://plus.google.com/share?url="+encodeURIComponent(location.href)) - }, - "weibo": function($el) { - window.open("http://service.weibo.com/share/share.php?content=utf-8&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent($("title").text())) - }, - "instapaper": function($el) { - window.open("http://www.instapaper.com/text?u="+encodeURIComponent(location.href)); - }, - "vk": function($el) { - window.open("http://vkontakte.ru/share.php?url="+encodeURIComponent(location.href)); - } - }; - - - // Bind all sharing button - var init = function() { - $(document).on("click", "a[data-sharing],button[data-sharing]", function(e) { - if (e) e.preventDefault(); - var type = $(this).data("sharing"); - - types[type]($(this)); - }) - }; - - return { - init: init - }; -}); |