fbshare.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Facebook share module for jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz
  3. *
  4. * http://www.heise.de/extras/socialshareprivacy/
  5. * http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html
  6. *
  7. * Copyright (c) 2011 Hilko Holweg, Sebastian Hilbig, Nicolas Heiringhoff, Juergen Schmidt,
  8. * Heise Zeitschriften Verlag GmbH & Co. KG, http://www.heise.de
  9. *
  10. * Copyright (c) 2012 Mathias Panzenböck
  11. *
  12. * Fbshare module:
  13. * copyright (c) 2013 zzzen.com
  14. *
  15. * is released under the MIT License http://www.opensource.org/licenses/mit-license.php
  16. *
  17. * Spread the word, link to us if you can.
  18. */
  19. (function ($, undefined) {
  20. "use strict";
  21. $.fn.socialSharePrivacy.settings.services.fbshare = {
  22. 'status' : true,
  23. 'privacy' : 'safe',
  24. 'button_class' : 'fbshare',
  25. 'line_img' : 'images/fbshare.png',
  26. 'box_img' : 'images/box_fbshare.png',
  27. 'txt_info' : 'Share via facebook.',
  28. 'txt_button' : 'Facebook Share',
  29. 'display_name' : 'Facebook Share',
  30. 'referrer_track' : '',
  31. 'button' : function (options, uri, settings) {
  32. return $('<a/>', {target: '_blank', href: 'https://www.facebook.com/sharer/sharer.php?'+$.param({u:uri + options.referrer_track})}).append(
  33. $('<img>', {alt: options.txt_button,
  34. src: options.path_prefix + (settings.layout === 'line' ? options.line_img : options.box_img)}));
  35. }
  36. };
  37. })(jQuery);