1/* 2 * 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 * is released under the MIT License http://www.opensource.org/licenses/mit-license.php 13 * 14 * Spread the word, link to us if you can. 15 */ 16(function ($, undefined) { 17 "use strict"; 18 19 function get (self, options, uri, settings, name) { 20 var value = options[name]; 21 if (typeof value === "function") { 22 return value.call(self, options, uri, settings); 23 } 24 return String(value); 25 } 26 27 $.fn.socialSharePrivacy.settings.services.buffer = { 28 'status' : true, 29 'dummy_line_img' : 'images/dummy_buffer.png', 30 'dummy_box_img' : 'images/dummy_box_buffer.png', 31 'dummy_alt' : '"Buffer"-Dummy', 32 'txt_info' : 'Two clicks for more privacy: The Buffer button will be enabled once you click here. Activating the button already sends data to Buffer – see <em>i</em>.', 33 'txt_off' : 'not connected to Buffer', 34 'txt_on' : 'connected to Buffer', 35 'perma_option' : true, 36 'display_name' : 'Buffer', 37 'referrer_track' : '', 38 'via' : '', 39 'text' : $.fn.socialSharePrivacy.getTitle, 40 'picture' : $.fn.socialSharePrivacy.getImage, 41 'button' : function (options, uri, settings) { 42 return $('<iframe allowtransparency="true" frameborder="0" scrolling="no"></iframe>').attr( 43 'src', 'http://widgets.bufferapp.com/button/?'+$.param({ 44 count : settings.layout === 'line' ? 'horizontal' : 'vertical', 45 via : get(this, options, uri, settings, 'via'), 46 text : $.fn.socialSharePrivacy.abbreviateText( 47 get(this, options, uri, settings, 'text'), 120), 48 picture : get(this, options, uri, settings, 'picture'), 49 url : uri + options.referrer_track, 50 source : 'button' 51 })); 52 } 53 }; 54})(jQuery); 55