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 var locales = {"af":["ZA"],"ar":["AR"],"az":["AZ"],"be":["BY"],"bg":["BG"],"bn":["IN"],"bs":["BA"],"ca":["ES"],"cs":["CZ"],"cy":["GB"],"da":["DK"],"de":["DE"],"el":["GR"],"en":["GB","PI","UD","US"],"eo":["EO"],"es":["ES","LA"],"et":["EE"],"eu":["ES"],"fa":["IR"],"fb":["LT"],"fi":["FI"],"fo":["FO"],"fr":["CA","FR"],"fy":["NL"],"ga":["IE"],"gl":["ES"],"he":["IL"],"hi":["IN"],"hr":["HR"],"hu":["HU"],"hy":["AM"],"id":["ID"],"is":["IS"],"it":["IT"],"ja":["JP"],"ka":["GE"],"km":["KH"],"ko":["KR"],"ku":["TR"],"la":["VA"],"lt":["LT"],"lv":["LV"],"mk":["MK"],"ml":["IN"],"ms":["MY"],"nb":["NO"],"ne":["NP"],"nl":["NL"],"nn":["NO"],"pa":["IN"],"pl":["PL"],"ps":["AF"],"pt":["BR","PT"],"ro":["RO"],"ru":["RU"],"sk":["SK"],"sl":["SI"],"sq":["AL"],"sr":["RS"],"sv":["SE"],"sw":["KE"],"ta":["IN"],"te":["IN"],"th":["TH"],"tl":["PH"],"tr":["TR"],"uk":["UA"],"vi":["VN"],"zh":["CN","HK","TW"]}; 20 21 $.fn.socialSharePrivacy.settings.services.facebook = { 22 'status' : true, 23 'button_class' : 'fb_like', 24 'dummy_line_img' : 'images/[email protected]', 25 'dummy_box_img' : 'images/dummy_box_facebook.png', 26 'dummy_alt' : 'Facebook "Like"-Dummy', 27 'txt_info' : 'Two clicks for more privacy: The Facebook Like button will be enabled once you click here. No data is loaded from Facebook until you enable the button. Click the [i] button for more information.', 28 'txt_off' : 'not connected to Facebook', 29 'txt_on' : 'connected to Facebook', 30 'perma_option' : true, 31 'display_name' : 'Facebook', 32 'referrer_track' : '', 33 'action' : 'like', 34 'colorscheme' : 'light', 35 'font' : '', 36 'button' : function (options, uri, settings) { 37 // ensure a locale that is supported by facebook 38 // otherwise facebook renders nothing 39 var match = /^([a-z]{2})_([A-Z]{2})$/.exec(options.language); 40 var locale = "en_US"; 41 42 if (match) { 43 if (match[1] in locales) { 44 var subs = locales[match[1]]; 45 if ($.inArray(match[2], subs) !== -1) { 46 locale = options.language; 47 } 48 else { 49 locale = match[1]+"_"+subs[0]; 50 } 51 } 52 } 53 else if (options.language in locales) { 54 locale = options.language+"_"+locales[options.language][0]; 55 } 56 57 var params = { 58 locale : locale, 59 href : uri + options.referrer_track, 60 send : 'false', 61 show_faces : 'false', 62 action : options.action, 63 colorscheme: options.colorscheme 64 }; 65 if (options.font) params.font = options.font; 66 67 if (settings.layout === 'line') { 68 params.width = '120'; 69 params.height = '20'; 70 params.layout = 'button_count'; 71 } 72 else { 73 params.width = '62'; 74 params.height = '61'; 75 params.layout = 'box_count'; 76 } 77 78 console.log( 'https://www.facebook.com/plugins/like.php?' + $.param(params) ); 79 80 return $('<iframe scrolling="no" frameborder="0" allowtransparency="true"></iframe>').attr( 81 'src', 'https://www.facebook.com/plugins/like.php?'+$.param(params)); 82 } 83 }; 84})(jQuery); 85 86/* 87 * jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz 88 * 89 * http://www.heise.de/extras/socialshareprivacy/ 90 * http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html 91 * 92 * Copyright (c) 2011 Hilko Holweg, Sebastian Hilbig, Nicolas Heiringhoff, Juergen Schmidt, 93 * Heise Zeitschriften Verlag GmbH & Co. KG, http://www.heise.de 94 * 95 * Copyright (c) 2012 Mathias Panzenböck 96 * 97 * is released under the MIT License http://www.opensource.org/licenses/mit-license.php 98 * 99 * Spread the word, link to us if you can. 100 */ 101 102(function ($, undefined) { 103 "use strict"; 104 105 $.fn.socialSharePrivacy.settings.services.twitter = { 106 'status' : true, 107 'button_class' : 'tweet', 108 'dummy_line_img' : 'images/[email protected]', 109 'dummy_box_img' : 'images/dummy_box_twitter.png', 110 'dummy_alt' : '"Tweet this"-Dummy', 111 'txt_info' : 'Two clicks for more privacy: The Tweet button will be enabled once you click here. No data is loaded from Twitter until you enable the button. Click the [i] button for more information.', 112 'txt_off' : 'not connected to Twitter', 113 'txt_on' : 'connected to Twitter', 114 'perma_option' : true, 115 'display_name' : 'Twitter', 116 'referrer_track' : '', 117 'via' : '', 118 'related' : '', 119 'hashtags' : '', 120 'dnt' : true, 121 'text' : $.fn.socialSharePrivacy.getTitle, 122 'button' : function (options, uri, settings) { 123 var text = typeof(options.text) === 'function' ? 124 options.text.call(this, options, uri, settings) : 125 String(options.text); 126 // 120 is the max character count left after twitters automatic 127 // url shortening with t.co 128 text = $.fn.socialSharePrivacy.abbreviateText(text, 120); 129 130 var params = { 131 url : uri + options.referrer_track,
132 counturl: uri, 133 text : text, 134 count : settings.layout === 'line' ? 'horizontal' : 'vertical', 135 lang : options.language 136 }; 137 if (options.via) params.via = options.via; 138 if (options.related) params.related = options.related; 139 if (options.hashtags) params.hashtags = options.hashtags; 140 if (options.dnt) params.dnt = options.dnt; 141 142 return $('<iframe allowtransparency="true" frameborder="0" scrolling="no"></iframe>').attr( 143 'src', 'https://platform.twitter.com/widgets/tweet_button.html?' + 144 $.param(params).replace(/\+/g,'%20')); 145 } 146 }; 147})(jQuery); 148 149jQuery.fn.socialSharePrivacy.settings.path_prefix = schneierSocial.path; 150 151// Load icons. 152jQuery(document).ready(function () { 153 jQuery( '.schneier-share' ).socialSharePrivacy(); 154});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.