added share buttons
12
gui.css
@@ -18,6 +18,18 @@ background: linear-gradient(top, #2d96c6 0%,#c9e6f4 100%);
|
||||
body, option {
|
||||
color: #294256;
|
||||
}
|
||||
#share {
|
||||
position: absolute;
|
||||
left: -100px;
|
||||
width: 100px;
|
||||
opacity: 0.5;
|
||||
*zoom: 1;
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
#share:hover {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
|
24
gui.js
@@ -71,24 +71,30 @@ function embedCode (config) {
|
||||
'})('+JSON.stringify(copy).replace(/\]\]/g,']"+"]')+'); /* ]]> */</script>');
|
||||
}
|
||||
|
||||
function iframeEmbedCode (config) {
|
||||
var iframeWidth = getNumberFieldValue($('iframe-width'));
|
||||
var iframeHeight = getNumberFieldValue($('iframe-height'));
|
||||
delete config.baseurl;
|
||||
config.paddock = $('paddock').checked;
|
||||
config.grass = $('grass').checked;
|
||||
return '<iframe src="'+absUrl("ponies-iframe.html#"+
|
||||
configToQueryString(config))+'" style="overflow:hidden;border-style:none;margin:0;'+
|
||||
'padding:0;background:transparent;width:'+iframeWidth+'px;'+iframeHeight+'px;" '+
|
||||
'width="'+iframeWidth+'" height="'+iframeHeight+'" '+
|
||||
'frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>';
|
||||
}
|
||||
|
||||
function updateConfig () {
|
||||
var config = dumpConfig();
|
||||
var code = ponyCode(config);
|
||||
var iframeWidth = getNumberFieldValue($('iframe-width'));
|
||||
var iframeHeight = getNumberFieldValue($('iframe-height'));
|
||||
|
||||
$('bookmarklet').href = 'javascript:'+code+'void(0)';
|
||||
$('embedcode').value = embedCode(config);
|
||||
|
||||
var baseurl = config.baseurl;
|
||||
delete config.baseurl;
|
||||
config.paddock = $('paddock').checked;
|
||||
$('iframe').value = '<iframe src="'+absUrl("ponies-iframe.html#"+
|
||||
configToQueryString(config))+'" style="overflow:hidden;border-style:none;margin:0;'+
|
||||
'padding:0;background:transparent;width:'+iframeWidth+'px;'+iframeHeight+'px;" '+
|
||||
'width="'+iframeWidth+'" height="'+iframeHeight+'" '+
|
||||
'frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>';
|
||||
$('iframe').value = iframeEmbedCode(config);
|
||||
delete config.paddock;
|
||||
delete config.grass;
|
||||
|
||||
BrowserPonies.setVolume(config.volume);
|
||||
BrowserPonies.setFadeDuration(config.fadeDuration);
|
||||
|
@@ -38,6 +38,9 @@ function loadConfig (configStr) {
|
||||
BrowserPonies.Util.$('paddock-back').style.display = config.paddock.trim().toLowerCase() === "true" ?
|
||||
'' : 'none';
|
||||
}
|
||||
if ('grass' in config && config.grass.trim().toLowerCase() === "true") {
|
||||
document.body.style.background = 'url("grass.png")';
|
||||
}
|
||||
}
|
||||
|
||||
if (!BrowserPoniesBaseConfig.loaded) {
|
||||
|
38
index.html
@@ -3,9 +3,11 @@
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1"/>
|
||||
<meta name="description" content="Browser Ponies lets you place ponies on websites"/>
|
||||
<title>Browser Ponies</title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
|
||||
<link rel="stylesheet" type="text/css" href="gui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="socialshareprivacy/socialshareprivacy.css"/>
|
||||
<!--[if IE]>
|
||||
<script type="text/javascript" src="http://stringencoders.googlecode.com/svn-history/r230/trunk/javascript/base64.js"></script>
|
||||
<script type="text/javascript">
|
||||
@@ -13,10 +15,40 @@ if (!window.btoa) window.btoa = base64.encode;
|
||||
if (!window.atob) window.atob = base64.decodeo;
|
||||
</script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
||||
<script type="text/javascript">jQuery.noConflict();</script>
|
||||
<script type="text/javascript" src="jquery.cookies.js"></script>
|
||||
<script type="text/javascript" src="jquery.socialshareprivacy.js"></script>
|
||||
<script type="text/javascript" src="jquery.socialshareprivacy.facebook.js"></script>
|
||||
<script type="text/javascript" src="jquery.socialshareprivacy.twitter.js"></script>
|
||||
<script type="text/javascript" src="jquery.socialshareprivacy.gplus.js"></script>
|
||||
<script type="text/javascript" src="jquery.socialshareprivacy.tumblr.js"></script>
|
||||
<script type="text/javascript" src="jquery.socialshareprivacy.reddit.js"></script>
|
||||
<script type="text/javascript" src="jquery.socialshareprivacy.pinterest.js"></script>
|
||||
<script type="text/javascript" src="jquery.socialshareprivacy.flattr.js"></script>
|
||||
<script type="text/javascript" src="ponycfg.js" id="browser-ponies-config"></script>
|
||||
<script type="text/javascript" src="browserponies.js" id="browser-ponies-script"></script>
|
||||
<script type="text/javascript" src="gui-common.js"></script>
|
||||
<script type="text/javascript" src="gui.js"></script>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
jQuery('#share').socialSharePrivacy({
|
||||
order: ['twitter','tumblr','reddit','gplus','pinterest','facebook','flattr'],
|
||||
layout: 'box',
|
||||
services: {
|
||||
tumblr: {type: 'video'},
|
||||
twitter: {tweet_text: jQuery.fn.socialSharePrivacy.getDescription}
|
||||
},
|
||||
image: absUrl('ponies/rainbow%20dash/hoverupdown_rainbow_right.gif'),
|
||||
embed: function () { return iframeEmbedCode({
|
||||
baseurl: absUrl(''),
|
||||
autostart: true,
|
||||
spawn: BrowserPoniesConfig.spawn
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init();updateConfig();initScriptUrl();">
|
||||
<div id="main">
|
||||
@@ -32,6 +64,8 @@ if (!window.atob) window.atob = base64.decodeo;
|
||||
<a class="button" href="javascript:BrowserPonies.unspawnAll();BrowserPonies.stop();void(0)" title="Remove all Ponies">×</a>
|
||||
</p>
|
||||
|
||||
<div id="share"></div>
|
||||
|
||||
<h2>What is this?</h2>
|
||||
<p>
|
||||
Browser Ponies lets you place <a href="http://en.wikipedia.org/wiki/My_Little_Pony:_Friendship_Is_Magic">ponies</a>
|
||||
@@ -99,6 +133,10 @@ you can use this embed code to confine the ponies into an iframe:</label>
|
||||
<td><input type="checkbox" id="paddock" onchange="updateConfig();" checked/></td>
|
||||
<td><label for="paddock">Show Paddock</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" id="grass" onchange="updateConfig();" checked/></td>
|
||||
<td><label for="grass">Show Grass</label></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
119
jquery.cookies.js
Normal file
@@ -0,0 +1,119 @@
|
||||
"use strict";
|
||||
|
||||
(function ($,undefined) {
|
||||
function get (name) {
|
||||
var cookies = {};
|
||||
if (document.cookie) {
|
||||
var values = document.cookie.split(/; */g);
|
||||
for (var i = 0; i < values.length; ++ i) {
|
||||
var value = values[i];
|
||||
var pos = value.search("=");
|
||||
var key, value;
|
||||
|
||||
if (pos < 0) {
|
||||
key = decodeURIComponent(value);
|
||||
value = undefined;
|
||||
}
|
||||
else {
|
||||
key = decodeURIComponent(value.slice(0,pos));
|
||||
value = decodeURIComponent(value.slice(pos+1));
|
||||
}
|
||||
|
||||
cookies[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
if (name === undefined) {
|
||||
return cookies;
|
||||
}
|
||||
else {
|
||||
return cookies[name];
|
||||
}
|
||||
}
|
||||
|
||||
function set (name, value, expires, path, domain, secure) {
|
||||
switch (arguments.length) {
|
||||
case 1:
|
||||
for (var key in name) {
|
||||
set(key, name[key]);
|
||||
}
|
||||
return;
|
||||
|
||||
case 2:
|
||||
if (value && typeof(value) === "object") {
|
||||
expires = value.expires;
|
||||
path = value.path;
|
||||
domain = value.domain;
|
||||
secure = value.secure;
|
||||
value = value.value;
|
||||
}
|
||||
}
|
||||
|
||||
if (value === null || value === undefined) {
|
||||
expires = -1;
|
||||
}
|
||||
|
||||
var buf = [encodeURIComponent(name)+'='+encodeURIComponent(value)];
|
||||
switch (typeof(expires)) {
|
||||
case "string":
|
||||
expires = new Date(expires);
|
||||
|
||||
case "object":
|
||||
buf.push("expires="+expires.toUTCString());
|
||||
break;
|
||||
|
||||
case "boolean":
|
||||
if (expires) {
|
||||
break;
|
||||
}
|
||||
expires = 365*2000;
|
||||
|
||||
case "number":
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime()+(1000*60*60*24*expires));
|
||||
buf.push("expires="+date.toUTCString());
|
||||
break;
|
||||
}
|
||||
|
||||
if (path === true) {
|
||||
buf.push("path="+document.location.pathname);
|
||||
}
|
||||
else if (path !== undefined && path !== false) {
|
||||
buf.push("path="+path.replace(/[;\s]/g,encodeURIComponent));
|
||||
}
|
||||
|
||||
if (domain === true) {
|
||||
buf.push("domain="+document.location.host);
|
||||
}
|
||||
else if (domain !== undefined && domain !== false) {
|
||||
buf.push("domain="+domain.replace(/[;\s]/g,encodeURIComponent));
|
||||
}
|
||||
|
||||
if (secure) {
|
||||
buf.push("secure");
|
||||
}
|
||||
|
||||
document.cookie = buf.join("; ");
|
||||
}
|
||||
|
||||
$.cookie = function () {
|
||||
switch (arguments.length) {
|
||||
case 0:
|
||||
return get();
|
||||
case 1:
|
||||
if (typeof(arguments[0]) !== "object") {
|
||||
return get(arguments[0]);
|
||||
}
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
set.apply(this,arguments);
|
||||
return this;
|
||||
|
||||
default:
|
||||
throw new Error("Illegal number of arguments");
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
4
jquery.min.js
vendored
Normal file
81
jquery.socialshareprivacy.facebook.js
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz
|
||||
*
|
||||
* http://www.heise.de/extras/socialshareprivacy/
|
||||
* http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html
|
||||
*
|
||||
* Copyright (c) 2011 Hilko Holweg, Sebastian Hilbig, Nicolas Heiringhoff, Juergen Schmidt,
|
||||
* Heise Zeitschriften Verlag GmbH & Co. KG, http://www.heise.de
|
||||
*
|
||||
* Copiright (c) 2012 Mathias Panzenböck
|
||||
*
|
||||
* is released under the MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Spread the word, link to us if you can.
|
||||
*/
|
||||
(function ($, undefined) {
|
||||
"use strict";
|
||||
|
||||
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":["US","GB","PI","UD"],"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"]};
|
||||
|
||||
$.fn.socialSharePrivacy.settings.services.facebook = {
|
||||
'status' : 'on',
|
||||
'button_class' : 'fb_like',
|
||||
'dummy_line_img' : 'socialshareprivacy/images/dummy_facebook.png',
|
||||
'dummy_box_img' : 'socialshareprivacy/images/dummy_box_facebook.png',
|
||||
'dummy_alt' : 'Facebook "Like"-Dummy',
|
||||
'txt_info' : '2 clicks for more privacy: The Facebook Like button will be enabled once you click here. Activating the button already sends data to Facebook – see <em>i</em>.',
|
||||
'txt_off' : 'not connetcted to Facebook',
|
||||
'txt_on' : 'connected to Facebook',
|
||||
'perma_option' : 'on',
|
||||
'display_name' : 'Facebook',
|
||||
'referrer_track' : '',
|
||||
'action' : 'like',
|
||||
'colorscheme' : 'light',
|
||||
'button' : function (options, uri, settings) {
|
||||
// ensure a locale that is supported by facebook
|
||||
// otherwise facebook renders nothing
|
||||
var match = /^([a-z]{2})_([A-Z]{2})$/.exec(options.language);
|
||||
var locale = "en_US";
|
||||
|
||||
if (match) {
|
||||
if (match[1] in locales) {
|
||||
var subs = locales[match[1]];
|
||||
if ($.inArray(match[2], subs) !== -1) {
|
||||
locale = options.language;
|
||||
}
|
||||
else {
|
||||
locale = match[1]+"_"+subs[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (options.language in locales) {
|
||||
locale = options.language+"_"+locales[options.language][0];
|
||||
}
|
||||
|
||||
var layout, w, h;
|
||||
if (settings.layout === 'line') {
|
||||
w = 120;
|
||||
h = 20;
|
||||
layout = 'button_count';
|
||||
}
|
||||
else {
|
||||
w = 62;
|
||||
h = 61;
|
||||
layout = 'box_count';
|
||||
}
|
||||
return $('<iframe scrolling="no" frameborder="0" allowtransparency="true"></iframe>').attr(
|
||||
'src','http://www.facebook.com/plugins/like.php?'+$.param({
|
||||
locale : locale,
|
||||
href : uri + options.referrer_track,
|
||||
send : 'false',
|
||||
layout : layout,
|
||||
width : String(w),
|
||||
height : String(h),
|
||||
show_faces : 'false',
|
||||
action : options.action,
|
||||
colorscheme: options.colorscheme
|
||||
}));
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
63
jquery.socialshareprivacy.flattr.js
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz
|
||||
*
|
||||
* Copiright (c) 2012 Mathias Panzenböck
|
||||
*
|
||||
* is released under the MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Spread the word, link to us if you can.
|
||||
*/
|
||||
|
||||
(function ($, undefined) {
|
||||
"use strict";
|
||||
|
||||
function get (self, options, uri, settings, name) {
|
||||
var value = options[name];
|
||||
if (typeof value === "function") {
|
||||
return value.call(self, options, uri, settings);
|
||||
}
|
||||
return String(value);
|
||||
}
|
||||
|
||||
$.fn.socialSharePrivacy.settings.services.flattr = {
|
||||
'status' : 'on',
|
||||
'button_class' : 'flatter',
|
||||
'dummy_line_img' : 'socialshareprivacy/images/dummy_flattr.png',
|
||||
'dummy_box_img' : 'socialshareprivacy/images/dummy_box_flattr.png',
|
||||
'dummy_alt' : '"Flattr"-Dummy',
|
||||
'txt_info' : '2 clicks for more privacy: The Flattr button will be enabled once you click here. Activating the button already sends data to Flattr – see <em>i</em>.',
|
||||
'txt_off' : 'not connceted to Flattr',
|
||||
'txt_on' : 'connceted to Flattr',
|
||||
'perma_option' : 'on',
|
||||
'display_name' : 'Flattr',
|
||||
'referrer_track' : '',
|
||||
'title' : $.fn.socialSharePrivacy.getTitle,
|
||||
'description' : $.fn.socialSharePrivacy.getDescription,
|
||||
'uid' : '',
|
||||
'category' : '',
|
||||
'tags' : '',
|
||||
'popout' : '',
|
||||
'hidden' : '',
|
||||
'button' : function (options, uri, settings) {
|
||||
var attrs = {
|
||||
href : uri + options.referrer_track,
|
||||
title : get(this, options, uri, settings, 'title'),
|
||||
'data-flattr-language' : options.language, // XXX: the language option doesn't
|
||||
lang : options.language // seem to have any effect
|
||||
};
|
||||
if (options.uid) attrs['data-flattr-uid'] = options.uid;
|
||||
if (options.hidden) attrs['data-flattr-hidden'] = options.hidden;
|
||||
if (options.popout) attrs['data-flattr-popout'] = options.popout;
|
||||
if (options.category) attrs['data-flattr-category'] = options.category;
|
||||
if (options.tags) attrs['data-flattr-tags'] = options.tags;
|
||||
if (settings.layout === 'line') attrs['data-flattr-button'] = 'compact';
|
||||
|
||||
var $code = $('<a class="FlattrButton">' + get(this, options, uri, settings, 'description') +
|
||||
'</a><script text="text/javscript" src="//api.flattr.com/js/0.6/load.js?mode=auto"></script>');
|
||||
|
||||
$code.filter('a').attr(attrs);
|
||||
|
||||
return $code;
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
44
jquery.socialshareprivacy.gplus.js
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz
|
||||
*
|
||||
* http://www.heise.de/extras/socialshareprivacy/
|
||||
* http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html
|
||||
*
|
||||
* Copyright (c) 2011 Hilko Holweg, Sebastian Hilbig, Nicolas Heiringhoff, Juergen Schmidt,
|
||||
* Heise Zeitschriften Verlag GmbH & Co. KG, http://www.heise.de
|
||||
*
|
||||
* Copiright (c) 2012 Mathias Panzenböck
|
||||
*
|
||||
* is released under the MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Spread the word, link to us if you can.
|
||||
*/
|
||||
(function ($, undefined) {
|
||||
"use strict";
|
||||
|
||||
$.fn.socialSharePrivacy.settings.services.gplus = {
|
||||
'status' : 'on',
|
||||
'button_class' : 'gplusone',
|
||||
'dummy_line_img' : 'socialshareprivacy/images/dummy_gplus.png',
|
||||
'dummy_box_img' : 'socialshareprivacy/images/dummy_box_gplus.png',
|
||||
'dummy_alt' : '"Google+1"-Dummy',
|
||||
'txt_info' : '2 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>.',
|
||||
'txt_off' : 'not connected to Google+',
|
||||
'txt_on' : 'connected to Google+',
|
||||
'perma_option' : 'on',
|
||||
'display_name' : 'Google+',
|
||||
'referrer_track' : '',
|
||||
'button' : function (options, uri, settings) {
|
||||
// we use the Google+ "asynchronous" code, standard code is flaky if inserted into dom after load
|
||||
var $code = $('<div class="g-plusone"></div><script type="text/javascript">window.___gcfg = {lang: "' +
|
||||
options.language.replace('_','-') + '"}; (function() { var po = document.createElement("script"); ' +
|
||||
'po.type = "text/javascript"; po.async = true; po.src = "https://apis.google.com/js/plusone.js"; ' +
|
||||
'var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s); })(); </script>');
|
||||
$code.filter('.g-plusone').attr({
|
||||
'data-href': uri + options.referrer_track,
|
||||
'data-size': settings.layout === 'line' ? 'medium' : 'tall'
|
||||
});
|
||||
return $code;
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
523
jquery.socialshareprivacy.js
Normal file
@@ -0,0 +1,523 @@
|
||||
/*
|
||||
* jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz
|
||||
*
|
||||
* http://www.heise.de/extras/socialshareprivacy/
|
||||
* http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html
|
||||
*
|
||||
* Copyright (c) 2011 Hilko Holweg, Sebastian Hilbig, Nicolas Heiringhoff, Juergen Schmidt,
|
||||
* Heise Zeitschriften Verlag GmbH & Co. KG, http://www.heise.de
|
||||
*
|
||||
* Copiright (c) 2012 Mathias Panzenböck
|
||||
*
|
||||
* is released under the MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Spread the word, link to us if you can.
|
||||
*/
|
||||
(function ($, undefined) {
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* helper functions
|
||||
*/
|
||||
|
||||
/**
|
||||
* Build an absolute url using a base url.
|
||||
* The provided base url has to be a valid absolute url. It will not be validated!
|
||||
* If no base url is given the document location is used.
|
||||
* Schemes that behave other than http might not work.
|
||||
* It tries to support file:-urls, but might fail in some cases.
|
||||
* email:-urls aren't supported at all (don't make sense anyway).
|
||||
*/
|
||||
function absurl (url, base) {
|
||||
if (!base) base = document.baseURI || $("html > head > base").last().attr("href") || document.location.href;
|
||||
if (!url) {
|
||||
return base;
|
||||
}
|
||||
else if (/^[a-z][-+\.a-z0-9]*:/i.test(url)) {
|
||||
// The scheme actually could contain any kind of alphanumerical unicode
|
||||
// character, but JavaScript regular expressions don't support unicode
|
||||
// character classes. Maybe /^[^:]+:/ or even /^.*:/ would be sufficient?
|
||||
return url;
|
||||
}
|
||||
else if (url.slice(0,2) === '//') {
|
||||
return /^[^:]+:/.exec(base)[0]+url;
|
||||
}
|
||||
|
||||
var ch = url.charAt(0);
|
||||
if (ch === '/') {
|
||||
if (/^file:/i.test(base)) {
|
||||
// file scheme has no hostname
|
||||
return 'file://'+url;
|
||||
}
|
||||
else {
|
||||
return /^[^:]+:\/*[^\/]+/i.exec(base)[0]+url;
|
||||
}
|
||||
}
|
||||
else if (ch === '#') {
|
||||
// assume "#" only occures at the end indicating the fragment
|
||||
return base.replace(/#.*$/,'')+url;
|
||||
}
|
||||
else if (ch === '?') {
|
||||
// assume "?" and "#" only occure at the end indicating the query
|
||||
// and the fragment
|
||||
return base.replace(/[\?#].*$/,'')+url;
|
||||
}
|
||||
else {
|
||||
var path;
|
||||
if (/^file:/i.test(base)) {
|
||||
path = base.replace(/^file:\/{0,2}/i,'');
|
||||
base = "file://";
|
||||
}
|
||||
else {
|
||||
var match = /^([^:]+:\/*[^\/]+)(\/.*?)?(\?.*?)?(#.*)?$/.exec(base);
|
||||
base = match[1];
|
||||
path = match[2]||"/";
|
||||
}
|
||||
|
||||
path = path.split("/");
|
||||
path.pop();
|
||||
if (path.length === 0) {
|
||||
// Ensure leading "/". Of course this is only valid on
|
||||
// unix like filesystems. More magic would be needed to
|
||||
// support other filesystems.
|
||||
path.push("");
|
||||
}
|
||||
path.push(url);
|
||||
return base+path.join("/");
|
||||
}
|
||||
}
|
||||
|
||||
// helper function that gets the title of the current page
|
||||
function getTitle (options, uri, settings) {
|
||||
var title = settings && settings.title;
|
||||
if (typeof title === "function") {
|
||||
title = title.call(this, options, uri, settings);
|
||||
}
|
||||
|
||||
if (title) {
|
||||
return title;
|
||||
}
|
||||
|
||||
var title = $('meta[name="DC.title"]').attr('content');
|
||||
var creator = $('meta[name="DC.creator"]').attr('content');
|
||||
|
||||
if (title && creator) {
|
||||
return title + ' - ' + creator;
|
||||
} else {
|
||||
return $('title').text();
|
||||
}
|
||||
}
|
||||
|
||||
function getDescription (options, uri, settings) {
|
||||
var description = settings && settings.description;
|
||||
if (typeof description === "function") {
|
||||
description = description.call(this, options, uri, settings);
|
||||
}
|
||||
|
||||
if (description) {
|
||||
return description;
|
||||
}
|
||||
|
||||
return abbreviateText($('meta[name="description"]').attr('content') ||
|
||||
$.trim($('article, p').first().text()) || $.trim($('body').text()), 3500);
|
||||
}
|
||||
|
||||
// find the largest image of the website
|
||||
// if no image at all is found use googles favicon service, which
|
||||
// defaults to a small globe (so there is always some image)
|
||||
function getImage (options, uri, settings) {
|
||||
var img = settings && settings.image;
|
||||
if (typeof img === "function") {
|
||||
img = img.call(this, options, uri, settings);
|
||||
}
|
||||
|
||||
if (img) {
|
||||
return img;
|
||||
}
|
||||
|
||||
var imgs = $('img').filter(':visible').filter(function () {
|
||||
return $(this).parents('.social_share_privacy_area').length === 0;
|
||||
});
|
||||
if (imgs.length === 0) {
|
||||
return $('link[rel~="shortcut"][rel~="icon"]').attr('href') ||
|
||||
'http://www.google.com/s2/favicons?'+$.param({domain:location.hostname});
|
||||
}
|
||||
imgs.sort(function (lhs, rhs) {
|
||||
return rhs.offsetWidth * rhs.offsetHeight - lhs.offsetWidth * lhs.offsetHeight;
|
||||
});
|
||||
// browser makes src absolute:
|
||||
return imgs[0].src;
|
||||
}
|
||||
|
||||
// abbreviate at last blank before length and add "\u2026" (horizontal ellipsis)
|
||||
function abbreviateText (text, length) {
|
||||
// length of UTF-8 encoded string
|
||||
if (unescape(encodeURIComponent(text)).length <= length) {
|
||||
return text;
|
||||
}
|
||||
|
||||
// "\u2026" is actually 3 bytes long in UTF-8
|
||||
// TODO: if any of the last 3 characters is > 1 byte long this truncates too much
|
||||
var abbrev = text.slice(0, length - 3);
|
||||
|
||||
if (!/\W/.test(text.charAt(length - 3))) {
|
||||
var match = /^(.*)\s\S*$/.exec(abbrev);
|
||||
if (match) {
|
||||
abbrev = match[1];
|
||||
}
|
||||
}
|
||||
return abbrev + "\u2026";
|
||||
}
|
||||
|
||||
var HTML_CHAR_MAP = {
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'&': '&',
|
||||
'"': '"',
|
||||
"'": '''
|
||||
};
|
||||
|
||||
function escapeHtml (s) {
|
||||
return s.replace(/[<>&"']/g, function (ch) {
|
||||
return HTML_CHAR_MAP[ch];
|
||||
});
|
||||
}
|
||||
|
||||
function getEmbed (options, uri, settings) {
|
||||
var embed = settings && settings.embed;
|
||||
if (typeof embed === "function") {
|
||||
embed = embed.call(this, options, uri, settings);
|
||||
}
|
||||
|
||||
if (embed) {
|
||||
return embed;
|
||||
}
|
||||
|
||||
return '<iframe scrolling="no" frameborder="0" style="border:none;" allowtransparency="true" src="' +
|
||||
escapeHtml(uri + options.referrer_track) + '"></iframe>';
|
||||
}
|
||||
|
||||
// build URI from rel="canonical" or document.location
|
||||
function getURI () {
|
||||
var uri = document.location.href;
|
||||
var canonical = $("link[rel=canonical]").attr("href");
|
||||
|
||||
if (canonical) {
|
||||
uri = absurl(canonical);
|
||||
}
|
||||
|
||||
return uri;
|
||||
}
|
||||
|
||||
function buttonClickHandler (service, button_class, uri, options) {
|
||||
function onclick () {
|
||||
var $container = $(this).parents('li.help_info').first();
|
||||
var $switch = $container.find('span.switch');
|
||||
if ($switch.hasClass('off')) {
|
||||
$container.addClass('info_off');
|
||||
$switch.addClass('on').removeClass('off').html(service.txt_on);
|
||||
$container.find('img.privacy_dummy').replaceWith(
|
||||
typeof(service.button) === "function" ?
|
||||
service.button.call($container.parent().parent()[0],service,uri,options) :
|
||||
service.button);
|
||||
} else {
|
||||
$container.removeClass('info_off');
|
||||
$switch.addClass('off').removeClass('on').html(service.txt_off);
|
||||
$container.find('.dummy_btn').empty().
|
||||
append($('<img/>').addClass(button_class+'_privacy_dummy privacy_dummy').
|
||||
attr({
|
||||
alt: service.dummy_alt,
|
||||
src: service.path_prefix + (options.layout === 'line' ?
|
||||
service.dummy_line_img : service.dummy_box_img)
|
||||
}).click(onclick));
|
||||
}
|
||||
};
|
||||
return onclick;
|
||||
}
|
||||
|
||||
// display info-overlays a tiny bit delayed
|
||||
function enterHelpInfo () {
|
||||
var $info_wrapper = $(this);
|
||||
if ($info_wrapper.hasClass('info_off')) return;
|
||||
var timeout_id = window.setTimeout(function () {
|
||||
$info_wrapper.addClass('display');
|
||||
$info_wrapper.removeData('timeout_id');
|
||||
}, 500);
|
||||
$info_wrapper.data('timeout_id', timeout_id);
|
||||
}
|
||||
|
||||
function leaveHelpInfo () {
|
||||
var $info_wrapper = $(this);
|
||||
var timeout_id = $info_wrapper.data('timeout_id');
|
||||
if (timeout_id !== undefined) {
|
||||
window.clearTimeout(timeout_id);
|
||||
}
|
||||
$info_wrapper.removeClass('display');
|
||||
}
|
||||
|
||||
function permCheckChangeHandler (options) {
|
||||
return function () {
|
||||
var $input = $(this);
|
||||
if ($input.is(':checked')) {
|
||||
options.set_perma_option($input.attr('data-service'), options);
|
||||
$input.parent().addClass('checked');
|
||||
} else {
|
||||
options.del_perma_option($input.attr('data-service'), options);
|
||||
$input.parent().removeClass('checked');
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function enterSettingsInfo () {
|
||||
var $settings = $(this);
|
||||
var timeout_id = window.setTimeout(function () {
|
||||
$settings.find('.settings_info_menu').removeClass('off').addClass('on');
|
||||
$settings.removeData('timeout_id');
|
||||
}, 500);
|
||||
$settings.data('timeout_id', timeout_id);
|
||||
}
|
||||
|
||||
function leaveSettingsInfo () {
|
||||
var $settings = $(this);
|
||||
var timeout_id = $settings.data('timeout_id');
|
||||
if (timeout_id !== undefined) {
|
||||
window.clearTimeout(timeout_id);
|
||||
}
|
||||
$settings.find('.settings_info_menu').removeClass('on').addClass('off');
|
||||
}
|
||||
|
||||
function setPermaOption (service_name, options) {
|
||||
$.cookie('socialSharePrivacy_'+service_name, 'perma_on', options.cookie_expires, options.cookie_path, options.cookie_domain);
|
||||
}
|
||||
|
||||
function delPermaOption (service_name, options) {
|
||||
$.cookie('socialSharePrivacy_'+service_name, null, -1, options.cookie_path, options.cookie_domain);
|
||||
}
|
||||
|
||||
function getPermaOption (service_name, options) {
|
||||
return !!options.get_perma_options(options)[service_name];
|
||||
}
|
||||
|
||||
function getPermaOptions (options) {
|
||||
var cookies = $.cookie();
|
||||
var permas = {};
|
||||
for (var name in cookies) {
|
||||
var match = /^socialSharePrivacy_(.+)$/.exec(name);
|
||||
if (match) {
|
||||
permas[match[1]] = cookies[name] === 'perma_on';
|
||||
}
|
||||
}
|
||||
return permas;
|
||||
}
|
||||
|
||||
|
||||
// extend jquery with our plugin function
|
||||
function socialSharePrivacy (options) {
|
||||
|
||||
// overwrite default values with user settings
|
||||
options = $.extend(true, {}, socialSharePrivacy.settings, options);
|
||||
var order = options.order || [];
|
||||
|
||||
var dummy_img = options.layout === 'line' ? 'dummy_line_img' : 'dummy_box_img';
|
||||
var any_on = false;
|
||||
var any_perm = false;
|
||||
var any_unsafe = false;
|
||||
var unordered = [];
|
||||
for (var service_name in options.services) {
|
||||
var service = options.services[service_name];
|
||||
if (service.status === 'on') {
|
||||
any_on = true;
|
||||
if ($.inArray(service_name, order) === -1) {
|
||||
unordered.push(service_name);
|
||||
}
|
||||
if (service.privacy !== 'safe') {
|
||||
any_unsafe = true;
|
||||
if (service.perma_option === 'on') {
|
||||
any_perm = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!('language' in service)) {
|
||||
service.language = options.language;
|
||||
}
|
||||
if (!('path_prefix' in service)) {
|
||||
service.path_prefix = options.path_prefix;
|
||||
}
|
||||
}
|
||||
unordered.sort();
|
||||
order = order.concat(unordered);
|
||||
|
||||
// check if at least one service is activated
|
||||
if (!any_on) {
|
||||
return;
|
||||
}
|
||||
|
||||
// insert stylesheet into document and prepend target element
|
||||
if (options.css_path) {
|
||||
var css_path = (options.path_prefix||"") + options.css_path;
|
||||
// IE fix (needed for IE < 9 - but done for all IE versions)
|
||||
if (document.createStyleSheet) {
|
||||
document.createStyleSheet(css_path);
|
||||
} else if ($('link[href="'+css_path+'"]').length === 0) {
|
||||
$(document.head).append($('<link rel="stylesheet" type="text/css" />').attr('href', css_path));
|
||||
}
|
||||
}
|
||||
|
||||
// get stored perma options
|
||||
var permas;
|
||||
if (options.perma_option === 'on' && any_perm) {
|
||||
if (options.get_perma_options) {
|
||||
permas = options.get_perma_options(options);
|
||||
}
|
||||
else {
|
||||
permas = {};
|
||||
for (var service_name in options.services) {
|
||||
permas[service_name] = options.get_perma_option(service_name, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// canonical uri that will be shared
|
||||
var uri = options.uri;
|
||||
if (typeof uri === 'function') {
|
||||
uri = uri.call(this, options);
|
||||
}
|
||||
|
||||
return this.each(function () {
|
||||
var $context = $('<ul class="social_share_privacy_area"></ul>').addClass(options.layout);
|
||||
|
||||
for (var i = 0; i < order.length; ++ i) {
|
||||
var service_name = order[i];
|
||||
var service = options.services[service_name];
|
||||
|
||||
if (service && service.status === 'on') {
|
||||
var class_name = service.class_name || service_name;
|
||||
var button_class = service.button_class || service_name;
|
||||
var $help_info;
|
||||
|
||||
if (service.privacy === 'safe') {
|
||||
$help_info = $('<li class="help_info"><span class="info">' +
|
||||
service.txt_info + '</span><div class="dummy_btn"></div></li>').addClass(class_name);
|
||||
$help_info.find('.dummy_btn').
|
||||
addClass(button_class).
|
||||
append(service.button.call(this,service,uri,options));
|
||||
}
|
||||
else {
|
||||
$help_info = $('<li class="help_info"><span class="info">' +
|
||||
service.txt_info + '</span><span class="switch off">' + service.txt_off +
|
||||
'</span><div class="dummy_btn"></div></li>').addClass(class_name);
|
||||
$help_info.find('.dummy_btn').
|
||||
addClass(button_class).
|
||||
append($('<img/>').addClass(button_class+'_privacy_dummy privacy_dummy').
|
||||
attr({
|
||||
alt: service.dummy_alt,
|
||||
src: service.path_prefix + service[dummy_img]
|
||||
}));
|
||||
|
||||
$help_info.find('.dummy_btn img.privacy_dummy, span.switch').click(
|
||||
buttonClickHandler(service, button_class, uri, options));
|
||||
}
|
||||
$context.append($help_info);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// append Info/Settings-area
|
||||
//
|
||||
if (any_unsafe) {
|
||||
var $settings_info = $('<li class="settings_info"><div class="settings_info_menu off perma_option_off"><a>' +
|
||||
'<span class="help_info icon"><span class="info">' + options.txt_help + '</span></span></a></div></li>');
|
||||
var $info_link = $settings_info.find('> .settings_info_menu > a').attr('href', options.info_link);
|
||||
if (options.info_link_target) {
|
||||
$info_link.attr("target",options.info_link_target);
|
||||
}
|
||||
$context.append($settings_info);
|
||||
|
||||
$context.find('.help_info').on('mouseenter', enterHelpInfo).on('mouseleave', leaveHelpInfo);
|
||||
|
||||
// menu for permanently enabling of service buttons
|
||||
if (options.perma_option === 'on' && any_perm) {
|
||||
|
||||
// define container
|
||||
var $container_settings_info = $context.find('li.settings_info');
|
||||
|
||||
// remove class that fomrats the i-icon, because perma-options are shown
|
||||
var $settings_info_menu = $container_settings_info.find('.settings_info_menu');
|
||||
$settings_info_menu.removeClass('perma_option_off');
|
||||
|
||||
// append perma-options-icon (.settings) and form (hidden)
|
||||
$settings_info_menu.append(
|
||||
'<span class="settings">' + options.txt_settings + '</span><form><fieldset><legend>' +
|
||||
options.settings_perma + '</legend></fieldset></form>');
|
||||
|
||||
|
||||
// write services with <input> and <label> and checked state from cookie
|
||||
var $fieldset = $settings_info_menu.find('form fieldset');
|
||||
for (var i = 0; i < order.length; ++ i) {
|
||||
var service_name = order[i];
|
||||
var service = options.services[service_name];
|
||||
|
||||
if (service && service.status === 'on' && service.perma_option === 'on' && service.privacy !== 'safe') {
|
||||
var class_name = service.class_name || service_name;
|
||||
var perma = permas[service_name];
|
||||
var $field = $('<label><input type="checkbox"' + (perma ? ' checked="checked"/>' : '/>') +
|
||||
service.display_name + '</label>');
|
||||
$field.find('input').attr('data-service', service_name);
|
||||
$fieldset.append($field);
|
||||
|
||||
// enable services when cookie set and refresh cookie
|
||||
if (perma) {
|
||||
$context.find('li.'+class_name+' span.switch').click();
|
||||
options.set_perma_option(service_name, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// indicate clickable setings gear
|
||||
$container_settings_info.find('span.settings').css('cursor', 'pointer');
|
||||
|
||||
// show settings menu on hover
|
||||
$container_settings_info.on('mouseenter', enterSettingsInfo).on('mouseleave', leaveSettingsInfo);
|
||||
|
||||
// interaction for <input> to enable services permanently (cookie will be set or deleted)
|
||||
$container_settings_info.find('fieldset input').on('change', permCheckChangeHandler(options));
|
||||
}
|
||||
}
|
||||
|
||||
$(this).prepend($context);
|
||||
});
|
||||
};
|
||||
|
||||
// expose helper functions:
|
||||
socialSharePrivacy.absurl = absurl;
|
||||
socialSharePrivacy.escapeHtml = escapeHtml;
|
||||
socialSharePrivacy.getTitle = getTitle;
|
||||
socialSharePrivacy.getImage = getImage;
|
||||
socialSharePrivacy.getEmbed = getEmbed;
|
||||
socialSharePrivacy.getDescription = getDescription;
|
||||
socialSharePrivacy.abbreviateText = abbreviateText;
|
||||
|
||||
socialSharePrivacy.settings = {
|
||||
'services' : {},
|
||||
// TODO: translate heise article to english
|
||||
'info_link' : 'http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html',
|
||||
'txt_settings' : 'Settings',
|
||||
'txt_help' : 'If you activate these fields via click, data will be sent to a third party (Facebook, Twitter, Google, ...) and stored there. For more details click <em>i</em>.',
|
||||
'settings_perma' : 'Permanently enable share buttons:',
|
||||
'layout' : 'line', // possible values: 'line' (~120x20) or 'box' (~58x62)
|
||||
'set_perma_option' : setPermaOption,
|
||||
'del_perma_option' : delPermaOption,
|
||||
'get_perma_options' : getPermaOptions,
|
||||
'get_perma_option' : getPermaOption,
|
||||
'perma_option' : $.cookie ? 'on' : 'off',
|
||||
'cookie_path' : '/',
|
||||
'cookie_domain' : document.location.hostname,
|
||||
'cookie_expires' : 365,
|
||||
'css_path' : 'socialshareprivacy/socialshareprivacy.css',
|
||||
'uri' : getURI,
|
||||
'path_prefix' : '',
|
||||
'language' : 'en'
|
||||
};
|
||||
|
||||
$.fn.socialSharePrivacy = socialSharePrivacy;
|
||||
}(jQuery));
|
31
jquery.socialshareprivacy.localstorage.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz
|
||||
*
|
||||
* Copiright (c) 2012 Mathias Panzenböck
|
||||
*
|
||||
* is released under the MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Spread the word, link to us if you can.
|
||||
*/
|
||||
(function ($, undefined) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.socialSharePrivacy.settings, {
|
||||
// Set perma_option to "on".
|
||||
// Initially it is only set to "on" if jQuery.cookie is available.
|
||||
perma_option: 'on',
|
||||
set_perma_option: function (service_name) {
|
||||
localStorage.setItem('socialSharePrivacy_'+service_name, 'perma_on');
|
||||
},
|
||||
del_perma_option: function (service_name) {
|
||||
localStorage.removeItem('socialSharePrivacy_'+service_name);
|
||||
},
|
||||
// Only one of the two methods "get_perma_options" and "get_perma_option" has
|
||||
// to be implemented. Though the other has to be set to null, so the default
|
||||
// cookie based method is not used.
|
||||
get_perma_options: null,
|
||||
get_perma_option: function (service_name) {
|
||||
return localStorage.getItem('socialSharePrivacy_'+service_name) === 'perma_on';
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
66
jquery.socialshareprivacy.pinterest.js
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz
|
||||
*
|
||||
* http://www.heise.de/extras/socialshareprivacy/
|
||||
* http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html
|
||||
*
|
||||
* Copyright (c) 2011 Hilko Holweg, Sebastian Hilbig, Nicolas Heiringhoff, Juergen Schmidt,
|
||||
* Heise Zeitschriften Verlag GmbH & Co. KG, http://www.heise.de
|
||||
*
|
||||
* Copiright (c) 2012 Mathias Panzenböck
|
||||
*
|
||||
* is released under the MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Spread the word, link to us if you can.
|
||||
*/
|
||||
|
||||
(function ($, undefined) {
|
||||
"use strict";
|
||||
|
||||
function get (self, options, uri, settings, name) {
|
||||
var value = options[name];
|
||||
if (typeof value === "function") {
|
||||
return value.call(self, options, uri, settings);
|
||||
}
|
||||
return String(value);
|
||||
}
|
||||
|
||||
$.fn.socialSharePrivacy.settings.services.pinterest = {
|
||||
'status' : 'on',
|
||||
'button_class' : 'pinit',
|
||||
'dummy_line_img' : 'socialshareprivacy/images/dummy_pinit.png',
|
||||
'dummy_box_img' : 'socialshareprivacy/images/dummy_box_pinit.png',
|
||||
'dummy_alt' : '"Pin it"-Dummy',
|
||||
'txt_info' : '2 clicks for more privacy: The Pin it button will be enabled once you click here. Activating the button already sends data to Pinterest – see <em>i</em>.',
|
||||
'txt_off' : 'not connceted to Pinterest',
|
||||
'txt_on' : 'connceted to Pinterest',
|
||||
'perma_option' : 'on',
|
||||
'display_name' : 'Pinterest',
|
||||
'referrer_track' : '',
|
||||
'title' : $.fn.socialSharePrivacy.getTitle,
|
||||
'description' : $.fn.socialSharePrivacy.getDescription,
|
||||
'media' : $.fn.socialSharePrivacy.getImage,
|
||||
'button' : function (options, uri, settings) {
|
||||
var base_url;
|
||||
if ('https:' === document.location.protocol) {
|
||||
base_url = 'https://assets.pinterest.com/pinit.html?';
|
||||
} else {
|
||||
base_url = 'http://pinit-cdn.pinterest.com/pinit.html?';
|
||||
}
|
||||
var params = {
|
||||
ref : uri,
|
||||
url : uri + options.referrer_track,
|
||||
layout : settings.layout === 'line' ? 'horizontal' : 'vertical',
|
||||
count : '1',
|
||||
media : get(this, options, uri, settings, 'media')
|
||||
};
|
||||
var title = get(this, options, uri, settings, 'title');
|
||||
var description = get(this, options, uri, settings, 'description');
|
||||
if (title) params.title = title;
|
||||
if (description) params.description = description;
|
||||
|
||||
return $('<iframe allowtransparency="true" frameborder="0" scrolling="no"></iframe>').attr(
|
||||
'src', base_url+$.param(params));
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
78
jquery.socialshareprivacy.reddit.js
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz
|
||||
*
|
||||
* http://www.heise.de/extras/socialshareprivacy/
|
||||
* http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html
|
||||
*
|
||||
* Copyright (c) 2011 Hilko Holweg, Sebastian Hilbig, Nicolas Heiringhoff, Juergen Schmidt,
|
||||
* Heise Zeitschriften Verlag GmbH & Co. KG, http://www.heise.de
|
||||
*
|
||||
* Copiright (c) 2012 Mathias Panzenböck
|
||||
*
|
||||
* is released under the MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Spread the word, link to us if you can.
|
||||
*/
|
||||
|
||||
(function ($, undefined) {
|
||||
"use strict";
|
||||
|
||||
function get (self, options, uri, settings, name) {
|
||||
var value = options[name];
|
||||
if (typeof value === "function") {
|
||||
return value.call(self, options, uri, settings);
|
||||
}
|
||||
return String(value);
|
||||
}
|
||||
|
||||
$.fn.socialSharePrivacy.settings.services.reddit = {
|
||||
'status' : 'on',
|
||||
'button_class' : 'reddit',
|
||||
'dummy_line_img' : 'socialshareprivacy/images/dummy_reddit.png',
|
||||
'dummy_box_img' : 'socialshareprivacy/images/dummy_box_reddit.png',
|
||||
'dummy_alt' : '"Reddit this!"-Dummy',
|
||||
'txt_info' : '2 clicks for more privacy: The reddit this! button will be enabled once you click here. Activating the button already sends data to reddit – see <em>i</em>.',
|
||||
'txt_off' : 'not connceted to reddit',
|
||||
'txt_on' : 'connceted to reddit',
|
||||
'perma_option' : 'on',
|
||||
'display_name' : 'Reddit',
|
||||
'referrer_track' : '',
|
||||
'title' : $.fn.socialSharePrivacy.getTitle,
|
||||
'target' : '',
|
||||
'newwindow' : '1',
|
||||
'bgcolor' : 'transparent',
|
||||
'bordercolor' : '',
|
||||
'css' : '',
|
||||
'button' : function (options, uri, settings) {
|
||||
var base_url, w, layout;
|
||||
if (settings.layout === 'line') {
|
||||
w = 120;
|
||||
layout = '/button/button1.html?';
|
||||
}
|
||||
else {
|
||||
w = 58;
|
||||
layout = '/button/button2.html?';
|
||||
}
|
||||
if ('https:' === document.location.protocol) {
|
||||
base_url = 'https://redditstatic.s3.amazonaws.com';
|
||||
} else {
|
||||
base_url = 'http://www.reddit.com/static';
|
||||
}
|
||||
var params = {
|
||||
url : uri + options.referrer_track,
|
||||
width : String(w)
|
||||
};
|
||||
var text = get(this, options, uri, settings, 'text');
|
||||
var target = get(this, options, uri, settings, 'target');
|
||||
if (text) params.text = text;
|
||||
if (target) params.text = target;
|
||||
if (options.bgcolor) params.bgcolor = options.bgcolor;
|
||||
if (options.bordercolor) params.bordercolor = options.bordercolor;
|
||||
if (options.css) params.css = options.css;
|
||||
if (options.newwindow) params.newwindow = options.newwindow;
|
||||
|
||||
return $('<iframe allowtransparency="true" frameborder="0" scrolling="no"></iframe>').attr(
|
||||
'src', base_url+layout+$.param(params));
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
107
jquery.socialshareprivacy.tumblr.js
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz
|
||||
*
|
||||
* Copiright (c) 2012 Mathias Panzenböck
|
||||
*
|
||||
* is released under the MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Spread the word, link to us if you can.
|
||||
*/
|
||||
(function ($, undefined) {
|
||||
"use strict";
|
||||
|
||||
function getQuote (options, uri, settings) {
|
||||
var text = $('article, p').text();
|
||||
|
||||
if (text.length <= 600) {
|
||||
return text;
|
||||
}
|
||||
|
||||
var abbrev = text.slice(0, 597);
|
||||
if (!/\W/.test(text.charAt(length - 3))) {
|
||||
var match = /^(.*)\s\S*$/.exec(abbrev);
|
||||
if (match) {
|
||||
abbrev = match[1];
|
||||
}
|
||||
}
|
||||
return abbrev + "\u2026";
|
||||
}
|
||||
|
||||
function getClickthru (options, uri) {
|
||||
return uri + options.referrer_track;
|
||||
}
|
||||
|
||||
function get (self, options, uri, settings, name) {
|
||||
var value = options[name];
|
||||
if (typeof value === "function") {
|
||||
return value.call(self, options, uri, settings);
|
||||
}
|
||||
return String(value);
|
||||
}
|
||||
|
||||
function openTumblr (event) {
|
||||
var winx = window.screenX || window.screenLeft;
|
||||
var winy = window.screenY || window.screenTop;
|
||||
var winw = window.outerWidth || window.innerWidth;
|
||||
var winh = window.outerHeight || window.innerHeight;
|
||||
var width = 450;
|
||||
var height = 430;
|
||||
var x = Math.round(winx + (winw - width) * 0.5);
|
||||
var y = Math.round(winy + (winh - height) * 0.5);
|
||||
window.open(this.href, 't', 'left='+x+',top='+y+',toolbar=0,resizable=0,status=0,menubar=0,width='+width+',height='+height);
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
$.fn.socialSharePrivacy.settings.services.tumblr = {
|
||||
'status' : 'on',
|
||||
'privacy' : 'safe',
|
||||
'button_class' : 'tubmlr',
|
||||
'txt_info' : 'Post this on Tumblr.',
|
||||
'txt_button' : 'Share on Tubmlr',
|
||||
'display_name' : 'Tumblr',
|
||||
'referrer_track' : '',
|
||||
'type' : 'link', // possible values are 'link', 'quote', 'photo' or 'video'
|
||||
// type: 'link':
|
||||
'name' : $.fn.socialSharePrivacy.getTitle,
|
||||
'description' : $.fn.socialSharePrivacy.getDescription,
|
||||
// type: 'quote':
|
||||
'quote' : getQuote,
|
||||
// type: 'photo':
|
||||
'photo' : $.fn.socialSharePrivacy.getImage,
|
||||
'clickthrou' : getClickthru,
|
||||
// type: 'video':
|
||||
'embed' : $.fn.socialSharePrivacy.getEmbed,
|
||||
// type: 'photo' or 'video':
|
||||
'caption' : $.fn.socialSharePrivacy.getDescription,
|
||||
'button' : function (options, uri, settings) {
|
||||
var $code = $('<a target="_blank">' + options.txt_button + '</a>').click(openTumblr);
|
||||
switch (options.type) {
|
||||
case 'link':
|
||||
return $code.attr('href', 'http://www.tumblr.com/share/link?'+$.param({
|
||||
url : uri + options.referrer_track,
|
||||
name : get(this, options, uri, settings, 'name'),
|
||||
description : get(this, options, uri, settings, 'description')
|
||||
}));
|
||||
|
||||
case 'quote':
|
||||
return $code.attr('href', 'http://www.tumblr.com/share/quote?'+$.param({
|
||||
source : uri + options.referrer_track,
|
||||
quote : get(this, options, uri, settings, 'quote')
|
||||
}));
|
||||
|
||||
case 'photo':
|
||||
return $code.attr('href', 'http://www.tumblr.com/share/photo?'+$.param({
|
||||
source : get(this, options, uri, settings, 'photo'),
|
||||
caption : get(this, options, uri, settings, 'caption'),
|
||||
clickthrou : get(this, options, uri, settings, 'clickthrou')
|
||||
}));
|
||||
|
||||
case 'video':
|
||||
return $code.attr('href', 'http://www.tumblr.com/share/video?'+$.param({
|
||||
embed : get(this, options, uri, settings, 'embed'),
|
||||
caption : get(this, options, uri, settings, 'caption')
|
||||
}));
|
||||
}
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
51
jquery.socialshareprivacy.twitter.js
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz
|
||||
*
|
||||
* http://www.heise.de/extras/socialshareprivacy/
|
||||
* http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html
|
||||
*
|
||||
* Copyright (c) 2011 Hilko Holweg, Sebastian Hilbig, Nicolas Heiringhoff, Juergen Schmidt,
|
||||
* Heise Zeitschriften Verlag GmbH & Co. KG, http://www.heise.de
|
||||
*
|
||||
* Copiright (c) 2012 Mathias Panzenböck
|
||||
*
|
||||
* is released under the MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Spread the word, link to us if you can.
|
||||
*/
|
||||
|
||||
(function ($, undefined) {
|
||||
"use strict";
|
||||
|
||||
$.fn.socialSharePrivacy.settings.services.twitter = {
|
||||
'status' : 'on',
|
||||
'button_class' : 'tweet',
|
||||
'dummy_line_img' : 'socialshareprivacy/images/dummy_twitter.png',
|
||||
'dummy_box_img' : 'socialshareprivacy/images/dummy_box_twitter.png',
|
||||
'dummy_alt' : '"Tweet this"-Dummy',
|
||||
'txt_info' : '2 clicks for more privacy: The Tweet this button will be enabled once you click here. Activating the button already sends data to Twitter – see <em>i</em>.',
|
||||
'txt_off' : 'not connceted to Twitter',
|
||||
'txt_on' : 'connceted to Twitter',
|
||||
'perma_option' : 'on',
|
||||
'display_name' : 'Twitter',
|
||||
'referrer_track' : '',
|
||||
'tweet_text' : $.fn.socialSharePrivacy.getTitle,
|
||||
'button' : function (options, uri, settings) {
|
||||
var text = typeof(options.tweet_text) === 'function' ?
|
||||
options.tweet_text.call(this, options, uri, settings) :
|
||||
String(options.tweet_text||'');
|
||||
// 120 is the max character count left after twitters automatic
|
||||
// url shortening with t.co
|
||||
text = $.fn.socialSharePrivacy.abbreviateText(text, 120);
|
||||
|
||||
return $('<iframe allowtransparency="true" frameborder="0" scrolling="no"></iframe>').attr(
|
||||
'src', 'http://platform.twitter.com/widgets/tweet_button.html?'+$.param({
|
||||
url : uri + options.referrer_track,
|
||||
counturl: uri,
|
||||
text : text,
|
||||
count : settings.layout === 'line' ? 'horizontal' : 'vertical',
|
||||
lang : options.language
|
||||
}).replace(/\+/g,'%20'));
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
4
socialshareprivacy/images/.directory
Normal file
@@ -0,0 +1,4 @@
|
||||
[Dolphin]
|
||||
AdditionalInfo=Details_Size,Details_Date,CustomizedDetails
|
||||
PreviewsShown=true
|
||||
Timestamp=2012,6,24,23,48,26
|
BIN
socialshareprivacy/images/2-klick-logo.jpg
Normal file
After Width: | Height: | Size: 90 KiB |
BIN
socialshareprivacy/images/dummy_box_facebook.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
socialshareprivacy/images/dummy_box_facebook_de.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
socialshareprivacy/images/dummy_box_flattr.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
socialshareprivacy/images/dummy_box_gplus.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
socialshareprivacy/images/dummy_box_pinit.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
socialshareprivacy/images/dummy_box_reddit.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
socialshareprivacy/images/dummy_box_twitter.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
socialshareprivacy/images/dummy_facebook.png
Normal file
After Width: | Height: | Size: 863 B |
BIN
socialshareprivacy/images/dummy_facebook_de.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
socialshareprivacy/images/dummy_flattr.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
socialshareprivacy/images/dummy_gplus.png
Normal file
After Width: | Height: | Size: 775 B |
BIN
socialshareprivacy/images/dummy_gplus_alt.png
Normal file
After Width: | Height: | Size: 668 B |
BIN
socialshareprivacy/images/dummy_pinit.png
Normal file
After Width: | Height: | Size: 848 B |
BIN
socialshareprivacy/images/dummy_reddit.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
socialshareprivacy/images/dummy_twitter.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
socialshareprivacy/images/settings.png
Normal file
After Width: | Height: | Size: 658 B |
BIN
socialshareprivacy/images/socialshareprivacy_info.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
socialshareprivacy/images/socialshareprivacy_on_off.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
socialshareprivacy/images/tumblr.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
socialshareprivacy/images/tumblr_box.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
337
socialshareprivacy/socialshareprivacy.css
Normal file
@@ -0,0 +1,337 @@
|
||||
.social_share_privacy_area {
|
||||
clear: both;
|
||||
margin: 20px 0 !important;
|
||||
list-style-type: none;
|
||||
padding: 0 !important;
|
||||
width: auto;
|
||||
display: block;
|
||||
}
|
||||
.social_share_privacy_area.line {
|
||||
height: 25px;
|
||||
}
|
||||
.social_share_privacy_area.box {
|
||||
width: 95px;
|
||||
}
|
||||
.social_share_privacy_area li {
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.social_share_privacy_area.box li {
|
||||
text-align: center;
|
||||
}
|
||||
.social_share_privacy_area.line li {
|
||||
height: 21px;
|
||||
float: left;
|
||||
}
|
||||
.social_share_privacy_area li .dummy_btn {
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
height: inherit;
|
||||
}
|
||||
.social_share_privacy_area.line li .dummy_btn {
|
||||
float: left;
|
||||
margin: 0 0 0 10px;
|
||||
}
|
||||
.social_share_privacy_area.box li .dummy_btn {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.social_share_privacy_area li div iframe {
|
||||
overflow: hidden;
|
||||
height: inherit;
|
||||
width: inherit;
|
||||
}
|
||||
/* Facebook begin */
|
||||
.social_share_privacy_area.line li {
|
||||
display: inline-block;
|
||||
}
|
||||
.social_share_privacy_area.line .facebook .fb_like {
|
||||
margin-right: 20px;
|
||||
width: 120px;
|
||||
}
|
||||
.social_share_privacy_area .pinterest iframe,
|
||||
.social_share_privacy_area .reddit iframe,
|
||||
.social_share_privacy_area .twitter iframe,
|
||||
.social_share_privacy_area .facebook iframe {
|
||||
overflow: hidden;
|
||||
border: none;
|
||||
}
|
||||
.social_share_privacy_area.line .facebook iframe {
|
||||
width: 120px;
|
||||
height: 20px;
|
||||
}
|
||||
.social_share_privacy_area.box .facebook iframe {
|
||||
width: 62px;
|
||||
height: 61px;
|
||||
}
|
||||
.social_share_privacy_area.line .pinterest iframe {
|
||||
width: 100px;
|
||||
height: 20px;
|
||||
}
|
||||
.social_share_privacy_area.box .pinterest iframe {
|
||||
width: 43px;
|
||||
height: 58px;
|
||||
}
|
||||
.social_share_privacy_area.line .reddit iframe {
|
||||
width: 120px;
|
||||
height: 18px;
|
||||
}
|
||||
.social_share_privacy_area.box .reddit iframe {
|
||||
width: 58px;
|
||||
height: 66px;
|
||||
}
|
||||
.social_share_privacy_area.line .twitter iframe {
|
||||
width: 120px;
|
||||
height: 20px;
|
||||
}
|
||||
.social_share_privacy_area.box .twitter iframe {
|
||||
width: 62px;
|
||||
height: 62px;
|
||||
}
|
||||
.social_share_privacy_area.box .flattr a {
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
margin: auto;
|
||||
}
|
||||
.social_share_privacy_area.line .flattr img {
|
||||
width: 72px;
|
||||
height: 20px;
|
||||
margin-right: 98px;
|
||||
}
|
||||
.social_share_privacy_area.line .flattr a,
|
||||
.social_share_privacy_area.line .flattr iframe {
|
||||
width: 150px;
|
||||
height: 20px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.social_share_privacy_area.line .flattr a {
|
||||
display: inline-block;
|
||||
}
|
||||
.social_share_privacy_area.box .flattr a,
|
||||
.social_share_privacy_area.box .flattr img,
|
||||
.social_share_privacy_area.box .flattr iframe {
|
||||
width: 62px;
|
||||
height: 62px;
|
||||
}
|
||||
/* Facebook end */
|
||||
/* Twitter begin */
|
||||
.social_share_privacy_area .tumblr a {
|
||||
text-indent: -9999em;
|
||||
overflow: hidden;
|
||||
}
|
||||
.social_share_privacy_area.line .tumblr a {
|
||||
display: inline-block;
|
||||
width: 81px;
|
||||
height: 20px;
|
||||
margin-right: 20px;
|
||||
background: url(images/tumblr.png) top left no-repeat transparent;
|
||||
}
|
||||
.social_share_privacy_area.box .tumblr a {
|
||||
display: block;
|
||||
margin: auto;
|
||||
width: 58px;
|
||||
height: 58px;
|
||||
background: url(images/tumblr_box.png) top left no-repeat transparent;
|
||||
}
|
||||
.social_share_privacy_area.line .reddit img,
|
||||
.social_share_privacy_area.line .reddit iframe {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.social_share_privacy_area.line li div.tweet {
|
||||
width: 115px;
|
||||
}
|
||||
.social_share_privacy_area.line li div.pinit {
|
||||
width: 100px;
|
||||
}
|
||||
/* Twitter end */
|
||||
/* Google+ begin */
|
||||
.social_share_privacy_area.line .gplus {
|
||||
width: 123px;
|
||||
}
|
||||
.social_share_privacy_area.line li div.gplusone {
|
||||
width: 90px;
|
||||
}
|
||||
/* Google+ end */
|
||||
/* Switch begin */
|
||||
.social_share_privacy_area li .switch {
|
||||
display: inline-block;
|
||||
text-indent: -9999em;
|
||||
background: transparent url(images/socialshareprivacy_on_off.png) no-repeat 0 0 scroll;
|
||||
width: 23px;
|
||||
height: 12px;
|
||||
overflow: hidden;
|
||||
margin: 4px 0 0;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
.social_share_privacy_area.line li .switch {
|
||||
float: left;
|
||||
}
|
||||
.social_share_privacy_area li .switch.on {
|
||||
background-position: 0 -12px;
|
||||
}
|
||||
/* Switch end */
|
||||
/* Tooltips begin */
|
||||
.social_share_privacy_area li.help_info {
|
||||
position: relative;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info,
|
||||
.social_share_privacy_area li.help_info .info {
|
||||
text-align: left;
|
||||
}
|
||||
.social_share_privacy_area li.help_info .info,
|
||||
.social_share_privacy_area li .help_info.icon .info {
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 40px;
|
||||
width: 290px;
|
||||
padding: 10px 15px;
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
font-weight: bold;
|
||||
border: 1px solid #ccc;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-moz-box-shadow: 0 3px 4px #999;
|
||||
-webkit-box-shadow: 0 3px 4px #999;
|
||||
box-shadow: 0 3px 4px #999;
|
||||
background-color: #fdfbec;
|
||||
color: #000;
|
||||
z-index: 500;
|
||||
}
|
||||
.social_share_privacy_area.line li.help_info .info,
|
||||
.social_share_privacy_area li .help_info.icon .info {
|
||||
left: 0;
|
||||
}
|
||||
.social_share_privacy_area.box li.help_info .info {
|
||||
left: 100%;
|
||||
}
|
||||
.social_share_privacy_area li .help_info.icon .info {
|
||||
width: 350px;
|
||||
}
|
||||
.social_share_privacy_area li.help_info.display .info,
|
||||
.social_share_privacy_area li .help_info.icon.display .info {
|
||||
display: block;
|
||||
}
|
||||
.social_share_privacy_area li.help_info.info_off.display .info {
|
||||
display: none;
|
||||
}
|
||||
.social_share_privacy_area li .help_info.icon {
|
||||
background: #fff url(images/socialshareprivacy_info.png) no-repeat center center scroll;
|
||||
width: 25px;
|
||||
height: 20px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
border: 2px solid #e7e3e3;
|
||||
border-right-width: 0;
|
||||
-moz-border-radius: 5px 0 0 5px;
|
||||
-webkit-border-radius: 5px 0 0 5px;
|
||||
border-radius: 5px 0 0 5px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info .settings_info_menu.on .help_info.icon {
|
||||
border-top-width: 0;
|
||||
border-left-width: 0;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info .settings_info_menu.perma_option_off .help_info.icon {
|
||||
border-right-width: 2px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
/* Tooltips end */
|
||||
/* Settings/Info begin */
|
||||
.social_share_privacy_area li.settings_info {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info a {
|
||||
text-decoration: none;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info .settings_info_menu {
|
||||
background-color: #f3f4f5;
|
||||
border: 2px solid #e7e3e3;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-moz-box-shadow: 2px 2px 3px #c1c1c1;
|
||||
-webkit-box-shadow: 2px 2px 3px #c1c1c1;
|
||||
box-shadow: 3px 3px 3px #c1c1c1;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 135px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info .settings_info_menu.on {
|
||||
z-index: 1000;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info .settings_info_menu.off {
|
||||
border-width: 0;
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info .settings_info_menu.off form {
|
||||
display: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info .settings_info_menu .settings {
|
||||
text-indent: -9999em;
|
||||
display: inline-block;
|
||||
background: #fff url(images/settings.png) no-repeat center center scroll;
|
||||
width: 25px;
|
||||
height: 20px;
|
||||
border: 2px solid #e7e3e3;
|
||||
-moz-border-radius: 0 5px 5px 0;
|
||||
-webkit-border-radius: 0 5px 5px 0;
|
||||
border-radius: 0 5px 5px 0;
|
||||
border-left: 1px solid #ddd;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info .settings_info_menu.on .settings {
|
||||
border-top-width: 0;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info .settings_info_menu form fieldset {
|
||||
border-width: 0;
|
||||
margin: 0;
|
||||
padding: 0 10px 10px;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info .settings_info_menu form fieldset legend {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
line-height: 14px;
|
||||
margin: 0;
|
||||
padding: 10px 0;
|
||||
width: 115px;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info .settings_info_menu form fieldset input {
|
||||
clear: both;
|
||||
float: left;
|
||||
margin: 4px 10px 4px 0;
|
||||
padding: 0;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info .settings_info_menu form fieldset label {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
line-height: 24px;
|
||||
-moz-transition: color .5s ease-in;
|
||||
-webkit-transition: color .5s ease-in;
|
||||
transition: color .5s ease-in;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.social_share_privacy_area li.settings_info .settings_info_menu form fieldset label.checked {
|
||||
color: #090;
|
||||
}
|
||||
/* Settings/Info end */
|