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 $.fn.socialSharePrivacy.settings.services.gplus = { 20 'status' : true, 21 'button_class' : 'gplusone', 22 'dummy_line_img' : 'images/dummy_gplus.png', 23 'dummy_box_img' : 'images/dummy_box_gplus.png', 24 'dummy_alt' : '"Google+1"-Dummy', 25 'txt_info' : 'Two clicks for more privacy: The Google+ button will be enabled once you click here. Activating the button already sends data to Google – see <em>i</em>.', 26 'txt_off' : 'not connected to Google+', 27 'txt_on' : 'connected to Google+', 28 'perma_option' : true, 29 'display_name' : 'Google+', 30 'referrer_track' : '', 31 'button' : function (options, uri, settings) { 32 // we use the Google+ "asynchronous" code, standard code is flaky if inserted into dom after load 33 var $code = $('<div class="g-plusone"></div><script type="text/javascript">window.___gcfg = {lang: "' + 34 options.language.replace('_','-') + '"}; (function() { var po = document.createElement("script"); ' + 35 'po.type = "text/javascript"; po.async = true; po.src = "https://apis.google.com/js/plusone.js"; ' + 36 'var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s); })(); </script>'); 37 $code.filter('.g-plusone').attr({ 38 'data-href': uri + options.referrer_track, 39 'data-size': settings.layout === 'line' ? 'medium' : 'tall' 40 }); 41 return $code; 42 } 43 }; 44})(jQuery); 45