Script "Social Share Privacy" entfernt, als Vorbereitung für DSGVO.
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 13 KiB |
@ -1,731 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html lang="de-DE">
|
|
||||||
<head>
|
|
||||||
<title>Dokumentation – heise „socialSharePrivacy“–Plug-In</title>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta name="author" content="Hilko Holweg, Sebastian Hilbig, Nicolas Heiringhoff, Juergen Schmidt - Heise Zeitschriften Verlag GbmH & Co. KG" />
|
|
||||||
<meta name="description" content="Dokumentation und Einbindung des heise SocialSharePrivacy-Plug-Ins" />
|
|
||||||
<style type="text/css">
|
|
||||||
h1, h2, h3 {
|
|
||||||
font: normal 24px/30px Georgia, Times, "Times New Roman", serif;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
font-size: 22px;
|
|
||||||
line-height: 28px;
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
font-size: 20px;
|
|
||||||
line-height: 26px;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: #039;
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
background-color: #eee;
|
|
||||||
border: 1px solid #bbb;
|
|
||||||
padding: 10px;
|
|
||||||
margin: 20px 0 0;
|
|
||||||
}
|
|
||||||
pre code {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
pre + p {
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
ol li, p, td, th {
|
|
||||||
font: normal 14px/20px "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, sans-serif;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
nav {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 50px;
|
|
||||||
border-bottom: 1px solid #333;
|
|
||||||
}
|
|
||||||
nav ol li,
|
|
||||||
nav ol li a {
|
|
||||||
font: bold 16px/24px "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, sans-serif;
|
|
||||||
color: #039;
|
|
||||||
-moz-transition: all .5s ease-in;
|
|
||||||
-webkit-transition: all .5s ease-in;
|
|
||||||
transition: all .5s ease-in;
|
|
||||||
}
|
|
||||||
nav ol li a:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
ol#structure li ol {
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
ol#structure li ol#fb_app_id_step_by_step {
|
|
||||||
list-style-type: decimal;
|
|
||||||
padding-left: 20px;
|
|
||||||
}
|
|
||||||
ol#structure li ol#fb_app_id_step_by_step li {
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
ol#structure li ol li {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
ol#structure li ol li table {
|
|
||||||
border: 1px solid #333;
|
|
||||||
width: 100%;
|
|
||||||
display: table;
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
ol#structure li ol.changelog li {
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
ol#structure li ol.changelog li pre {
|
|
||||||
margin: 5px 0 20px;
|
|
||||||
}
|
|
||||||
table caption {
|
|
||||||
text-align: left;
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: bold;
|
|
||||||
text-indent: 5px;
|
|
||||||
}
|
|
||||||
table th {
|
|
||||||
text-align: left;
|
|
||||||
font-style: italic;
|
|
||||||
background-color: #333;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
table th,
|
|
||||||
table td {
|
|
||||||
padding: 2px 4px;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
table tr:hover td {
|
|
||||||
background-color: #eee;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>jQuery Plug-In socialshareprivacy – Dokumentation</h1>
|
|
||||||
|
|
||||||
<h3>Download des jQuery-Plug-Ins:</h3>
|
|
||||||
<p>
|
|
||||||
<a href="http://www.heise.de/extras/socialshareprivacy/jquery.socialshareprivacy.zip">jquery.socialshareprivacy.zip</a><br />
|
|
||||||
<a href="http://www.heise.de/extras/socialshareprivacy/jquery.socialshareprivacy.tar.gz">jquery.socialshareprivacy.tar.gz</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<h2>Navigation</h2>
|
|
||||||
<ol>
|
|
||||||
<li><a href="#changelog">Change-Log</a></li>
|
|
||||||
<li><a href="#files">Dateien</a></li>
|
|
||||||
<li><a href="#pre">Voraussetzungen und Einschränkungen</a></li>
|
|
||||||
<li><a href="#dimensions">Ausmaße</a></li>
|
|
||||||
<li>Einfache Einbindung
|
|
||||||
<ol>
|
|
||||||
<li><a href="#merge">Quelltext</a></li>
|
|
||||||
<li><a href="#explanation">Erklärung des Codes</a></li>
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
<li><a href="#options">Optionen</a>
|
|
||||||
<ol>
|
|
||||||
<li><a href="#options_general">Allgemein</a></li>
|
|
||||||
<li><a href="#options_facebook">Facebook</a></li>
|
|
||||||
<li><a href="#options_twitter">Twitter</a></li>
|
|
||||||
<li><a href="#options_gplus">Google+</a></li>
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
<li><a href="#examples">Beispiel-Einbindungen</a>
|
|
||||||
<ol>
|
|
||||||
<li><a href="#only_fb">Nur Facebook einbinden</a></li>
|
|
||||||
<li><a href="#no_perma">Keine Option zum dauerhaften Aktivieren anbieten</a></li>
|
|
||||||
<li><a href="#only_gplus_css_path">Nur Google+ anbieten und eigenen Pfad für die CSS-Datei angeben.</a></li>
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
<li><a href="#url">URL</a></li>
|
|
||||||
<li><a href="#perma_option">Einstellung merken</a></li>
|
|
||||||
<li><a href="#licence">Lizenz</a></li>
|
|
||||||
<li><a href="#logo">Logo</a></li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<ol id="structure">
|
|
||||||
<li>
|
|
||||||
<h2 id="changelog">Change-Log</h2>
|
|
||||||
<ol class="changelog">
|
|
||||||
<li>
|
|
||||||
<h3 id="v1-3">Version 1.3</h3>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
Erste Fassung, die auch mehrmals auf einer Seite verwendet werden kann. Damit in den verschiedenen Instanzen unterschiedliche URIs verwendet werden können, wird der per Option <code>uri</code> gesetzen Funktion ein Kontext-DOM-Knoten übergeben, über den man eine URI ermitteln kann. Beispiele für die Verwendung haben wir in der Dokumentation bei den <a href="#examples">Beispiel-Einbindungen</a> ergänzt.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Korrektur für IE < 9: Das per <code>css_path</code> angegebene Stylesheet wurde mit jQuery-Versionen != 1.4.2 nicht eingebaut.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h3 id="v1-2">Version 1.2</h3>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
JS: Facebook App-ID entfernt, da diese nicht mehr nötig ist, um den Like/Recommend-Button zu nutzen.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h3 id="v1-1">Version 1.1</h3>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
CSS: Bei diversen Elementen haben wir mehr Angaben hinzugefügt, um die Nacharbeiten, bei der Integration in eigene Seiten, geringer zu halten. Vor allem haben wir <code>margin</code>-, <code>padding</code>-, <code>width</code>- und <code>height</code>-Angaben hinzugefügt.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Die Doku wurde um einen Beispiele- und diesen Change-Log-Bereich erweitert.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Das Plug-In wurde inhaltlich etwas umgestellt und einige Code-Abkürzungen vorgenommen.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
JS-Bug Korrektur: Es gab einen Fehler, wenn es in der Seite ein <code>canonical</code>-Attribut gab, das aber einen leeren Wert hatte.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
JS-Bug Korrektur: Bei den Optionen von Google+ gab es eine Angabe, die später im Script nie abgefragt wurde.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
JS-Bug Korrektur: Die Perma-Option von Google+ wurde nur angezeigt, wenn auch die Perma-Option von Twitter aktiviert war.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Twitter: Wenn aktiviert war das iFrame zu groß und überlagerte darunter liegende Links. <code><iframe ...style="width:130px; height:25px;"></iframe></code> ergänzt.
|
|
||||||
</li>
|
|
||||||
<li>Allgemein: Wenn die Option css_path leer ist, wird kein <link>-Tag mit leerem href in die Seite eingebaut.</li>
|
|
||||||
<li>Allgemein: Die von den Buttons verwendete URI kann jetzt über die Option <code>uri</code> gesteuert werden. Es ist sowohl ein fester Wert, wie auch eine Function möglich. Default ist die enthaltene Funktion <code>getURI</code></li>
|
|
||||||
<li><strong>Neue Features:</strong>
|
|
||||||
<ul>
|
|
||||||
<li>Facebook: Die Beschriftungsvarianten des Buttons "Empfehlen" und "Gefällt mir" kann über die neue Option "action" gesteuert werden. Werte sind "<code>recommend</code>" (default) und "<code>like</code>".</li>
|
|
||||||
<li>Twitter: Parameter "<code>language</code>" (default "<code>en</code>") jetzt auch für Twitter.</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h3 id="v1-0">Version 1.0</h3>
|
|
||||||
<ul>
|
|
||||||
<li>Erstes öffentliches Release</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<h2 id="files">Dateien</h2>
|
|
||||||
<p>Zu unserem Plug-In gehören folgende Dateien:</p>
|
|
||||||
<ul>
|
|
||||||
<li>index.html (die Doku, die Sie gerade lesen)</li>
|
|
||||||
<li>dimensions.gif (Infografik für diese Doku)</li>
|
|
||||||
<li>2-klick-logo_min.jpg (Logo klein)</li>
|
|
||||||
<li>jquery.socialshareprivacy.js</li>
|
|
||||||
<li>jquery.socialshareprivacy.min.js</li>
|
|
||||||
<li>socialshareprivacy/socialshareprivacy.css</li>
|
|
||||||
<li>socialshareprivacy/images/dummy_facebook.png</li>
|
|
||||||
<li>socialshareprivacy/images/dummy_facebook_en.png</li>
|
|
||||||
<li>socialshareprivacy/images/dummy_gplus.png</li>
|
|
||||||
<li>socialshareprivacy/images/dummy_twitter.png</li>
|
|
||||||
<li>socialshareprivacy/images/settings.png</li>
|
|
||||||
<li>socialshareprivacy/images/socialshareprivacy_info.png</li>
|
|
||||||
<li>socialshareprivacy/images/socialshareprivacy_on_off.png</li>
|
|
||||||
<li>socialshareprivacy/images/2-klick-logo.jpg</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h2 id="pre">Voraussetzungen und Einschränkungen</h2>
|
|
||||||
<p>
|
|
||||||
Technische Voraussetzungen sind jQuery und aktiviertes JavaScript im Browser. Bei uns getestet mit jQuery 1.4.<br />
|
|
||||||
Das Plug-In kann derzeit innerhalb einer HTML-Seite nur einmal verwendet werden.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Wenn Sie Vorschläge zur Verbesserung haben, wenden Sie sich gerne per Mail an <a href="mailto:2klick@heise.de?subject=Vorschlag%20zum%20Plug-In">2klick@heise.de</a>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Das dauerhafte Aktivieren der Services funktioniert im Internet Explorer erst ab Version 8, da die Vorgängerversionen kein JSON unterstützen. Daher fehlt im IE <= 7 diese Funktion. Der Rest des Plug-Ins ist davon nicht betroffen.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<del datetime="2011-10-04" cite="http://www.heise.de/extras/socialshareprivacy/#v1-2">Für Facebook ist zwingend eine eigene App-ID notwendig, siehe dazu <a href="#fb_app-id">Hinweis zur Facebook App-ID</a>.</del>
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h2 id="dimensions">Ausmaße</h2>
|
|
||||||
<img src="dimensions.gif" width="600" height="284" alt="Ausmaße des Plug-Ins" />
|
|
||||||
<p>
|
|
||||||
Das Plug-In benötigt insgesamt etwa 600 Pixel in der Breite (wenn alle Services aktiviert sind) und ca. 290 Pixel in der Höhe, wobei dies natürlich auch von der Länge der angegebenen MouseOver-Texte abhängt.
|
|
||||||
</p>
|
|
||||||
<li>
|
|
||||||
<ol>
|
|
||||||
<li>
|
|
||||||
<h2 id="merge">Einbindung</h2>
|
|
||||||
<pre>
|
|
||||||
<code><head>
|
|
||||||
…
|
|
||||||
<script type="text/javascript" src="jquery.js"></script>
|
|
||||||
<script type="text/javascript" src="jquery.socialshareprivacy.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
jQuery(document).ready(function($){
|
|
||||||
if($('#socialshareprivacy').length > 0){
|
|
||||||
$('#socialshareprivacy').socialSharePrivacy();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
…
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
…
|
|
||||||
<div id="socialshareprivacy"></div>
|
|
||||||
…
|
|
||||||
</body></code>
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h3 id="explanation">Erklärung des Codes</h3>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<code><script type="text/javascript" src="jquery.js"></script>
|
|
||||||
<script type="text/javascript" src="jquery.socialshareprivacy.js"></script></code>
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
Die erste Zeile bindet das JavaScript-Framework „JQuery“ (<a href="http://jquery.com/">http://jquery.com/</a>) ein, die zweite Zeile unser Plug-In. jQuery liegt unserem Paket <strong>nicht</strong> bei, Sie müssen es erst noch selbst von der eben genannten Website herunterladen.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<code><script type="text/javascript">
|
|
||||||
jQuery(document).ready(function($){
|
|
||||||
if($('#socialshareprivacy').length > 0){
|
|
||||||
$('#socialshareprivacy').socialSharePrivacy();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script></code>
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
In diesem <code><script></code>-Block wird die Plug-In Funktion an ein frei wählbares, leeres HTML-Element in der Seite gehängt, in diesem Fall das Element mit der <code>id</code> <em>socialshareprivacy</em>.<br />
|
|
||||||
Damit das Anhängen des Plug-Ins nur dann geschieht, wenn das Element auch wirklich vorhanden ist, haben wir noch die Kontrollfunktion <code>if</code>, die das Anhängen umschließt und die nötige Bedingung prüft.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<code><body>
|
|
||||||
…
|
|
||||||
<div id="socialshareprivacy"></div>
|
|
||||||
…
|
|
||||||
</body></code>
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
Irgendwo im <code><body></code>-Bereich der Website platziert man das leere HTML-Element mit der gewünschten <code>id</code>, die identisch zur verwendeten <code>id</code> im vorhergehenden <code><script></code>-Block sein muss.
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h2 id="options">Optionen</h2>
|
|
||||||
<p>
|
|
||||||
Zur Einbindung stehen diverse Optionen zur Verfügung. Im Folgenden sind erstmal die allgemeinen Optionen aufgeführt und anschließend die Optionen nach den einzelnen Services (Facebook, Twitter, Google+) aufgelistet.<br />
|
|
||||||
Beispiel für einen Aufruf mit Optionen:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
<code>$('#socialshareprivacy').socialSharePrivacy({
|
|
||||||
services : {
|
|
||||||
facebook : {
|
|
||||||
'perma_option': 'off'
|
|
||||||
},
|
|
||||||
twitter : {
|
|
||||||
'status' : 'off'
|
|
||||||
},
|
|
||||||
gplus : {
|
|
||||||
'display_name' : 'Google Plus'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'cookie_domain' : 'heise.de'
|
|
||||||
});</code>
|
|
||||||
</pre>
|
|
||||||
<ol>
|
|
||||||
<li id="options_general">
|
|
||||||
<table summary="Eine Auflistung aller allgemeinen Optionen des socialSharePrivacy-Plug-Ins">
|
|
||||||
<caption>allgemeine Optionen</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Option</th>
|
|
||||||
<th>Standardwert</th>
|
|
||||||
<th>Beschreibung</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>info_link</td>
|
|
||||||
<td>http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html</td>
|
|
||||||
<td>Link zu detaillierter Datenschutz-Info, in unserem Fall ein heise-Artikel.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>txt_help</td>
|
|
||||||
<td><em>Text</em></td>
|
|
||||||
<td>MouseOver-Text des <em>i</em>-Icons</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>settings_perma</td>
|
|
||||||
<td>Dauerhaft aktivieren und Datenüber­tragung zustimmen:</td>
|
|
||||||
<td>Überschrift des Einstellungsmenüs</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>cookie_path</td>
|
|
||||||
<td>/</td>
|
|
||||||
<td>Pfad der Gültigkeit des Cookies</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>cookie_domain</td>
|
|
||||||
<td><code>document.location.host</code></td>
|
|
||||||
<td>Domain für die das Cookie gültig ist</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>cookie_expires</td>
|
|
||||||
<td>365</td>
|
|
||||||
<td>Dauer die das Cookie gültig ist in Tagen</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>css_path</td>
|
|
||||||
<td>socialshareprivacy/socialshareprivacy.css</td>
|
|
||||||
<td>Pfad zur CSS-Datei, wenn leer wird kein Stylesheet eingebaut</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>uri</td>
|
|
||||||
<td>getURI</td>
|
|
||||||
<td>Die URI, die von den Buttons weitergegeben werden soll. Möglich ist ein fester Wert (z.B. <code>"http://www.heise.de"</code>) oder eine Funktion (siehe <code>function getURI()</code> im Plug-In-Quellcode)</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</li>
|
|
||||||
<li id="options_facebook">
|
|
||||||
<table summary="Eine Auflistung aller Optionen für Facebook des socialSharePrivacy-Plug-Ins">
|
|
||||||
<caption>Optionen: Facebook</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Option</th>
|
|
||||||
<th>Standardwert</th>
|
|
||||||
<th>Beschreibung</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>status</td>
|
|
||||||
<td>on</td>
|
|
||||||
<td>Der User hat Facebook zur Auswahl</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><del datetime="2011-10-04" cite="http://www.heise.de/extras/socialshareprivacy/#v1-2">app_id</del></td>
|
|
||||||
<td><em>entfallen (seit Version 1.2)</em></td>
|
|
||||||
<td><del datetime="2011-10-04" cite="http://www.heise.de/extras/socialshareprivacy/#v1-2">Facebook App-ID; Sie ist nötig um den <em>Empfehlen</em>-Button von Facebook nutzen zu können. Ist sie nicht angegeben, wird dem User Facebook trotz <code>'status' : 'on'</code> <strong>nicht</strong> angeboten. In der JavaScript-Konsole wird dem Entwickler ein entsprechender Hinweis ausgegeben.</del></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>dummy_img</td>
|
|
||||||
<td>socialshareprivacy/images/dummy_facebook.png</td>
|
|
||||||
<td>Pfad zur statischen Grafik</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>txt_info</td>
|
|
||||||
<td><em>Text</em></td>
|
|
||||||
<td>MouseOver-Text des Empfehlen-Buttons</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>txt_fb_off</td>
|
|
||||||
<td>nicht mit Facebook verbunden</td>
|
|
||||||
<td>Text-Entsprechung der Schalter-Grafik im ausgeschalteten Zustand, in der Regel nicht sichtbar für den User</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>txt_fb_on</td>
|
|
||||||
<td>mit Facebook verbunden</td>
|
|
||||||
<td>Text-Entsprechung der Schalter-Grafik im eingeschalteten Zustand, in der Regel nicht sichtbar für den User</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>perma_option</td>
|
|
||||||
<td>on</td>
|
|
||||||
<td>Der User hat die Option sich Facebook dauerhaft einblenden zu lassen (mittels Cookie)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>display_name</td>
|
|
||||||
<td>Facebook</td>
|
|
||||||
<td>Schreibweise des Service in den Optionen</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>referrer_track</td>
|
|
||||||
<td> </td>
|
|
||||||
<td>Wird ans Ende der URL gehängt, kann zum Tracken des Referrers genutzt werden</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>language</td>
|
|
||||||
<td>de_DE</td>
|
|
||||||
<td>Spracheinstellung</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>action</td>
|
|
||||||
<td>recommend</td>
|
|
||||||
<td>Beschriftung des Buttons: Empfehlen (<code>recommend</code>) oder Gefällt mir (<code>like</code>)</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</li>
|
|
||||||
<li id="options_twitter">
|
|
||||||
<table summary="Eine Auflistung aller Optionen für Twitter des socialSharePrivacy-Plug-Ins">
|
|
||||||
<caption>Optionen: Twitter</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Option</th>
|
|
||||||
<th>Standardwert</th>
|
|
||||||
<th>Beschreibung</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>status</td>
|
|
||||||
<td>on</td>
|
|
||||||
<td>Der User hat Twitter zur Auswahl</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>dummy_img</td>
|
|
||||||
<td>socialshareprivacy/images/dummy_twitter.png</td>
|
|
||||||
<td>Pfad zur statischen Grafik</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>txt_info</td>
|
|
||||||
<td><em>Text</em></td>
|
|
||||||
<td>MouseOver-Text des Tweet-Buttons</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>txt_twitter_off</td>
|
|
||||||
<td>nicht mit Twitter verbunden</td>
|
|
||||||
<td>Text-Entsprechung der Schalter-Grafik im ausgeschalteten Zustand, in der Regel nicht sichtbar für den User</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>txt_twitter_on</td>
|
|
||||||
<td>mit Twitter verbunden</td>
|
|
||||||
<td>Text-Entsprechung der Schalter-Grafik im eingeschalteten Zustand, in der Regel nicht sichtbar für den User</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>perma_option</td>
|
|
||||||
<td>on</td>
|
|
||||||
<td>Der User hat die Option sich Twitter dauerhaft einblenden zu lassen (mittels Cookie)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>display_name</td>
|
|
||||||
<td>Twitter</td>
|
|
||||||
<td>Schreibweise des Service in den Optionen</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>referrer_track</td>
|
|
||||||
<td> </td>
|
|
||||||
<td>Wird ans Ende der URL gehängt, kann zum Tracken des Referrers genutzt werden</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>tweet_text</td>
|
|
||||||
<td><code>getTweetText</code></td>
|
|
||||||
<td>
|
|
||||||
Die Funktion prüft ob es die Meta-Angabe <code>DC.title</code> gibt und verwendet diese. Gibt es außerdem noch <code>DC.creator</code> wird diese etwas abgesetzt (" - ") hinten angehängt. Ist <code>DC.title</code> nicht vorhanden wird das <title>-Tag der Seite verwendet.<br />
|
|
||||||
Diese Option kann mit einem eigenen Text (<code>typeof == string</code>) überschrieben werden oder mit einer eigenen Funktion (<code>typeof == function</code>), die den Text generiert.<br />
|
|
||||||
Der übergebene Texte wird immer auf 120 Zeichen gekürzt und beim letzten Leerzeichen mit … ersetzt.
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>language</td>
|
|
||||||
<td>en</td>
|
|
||||||
<td>Spracheinstellung (Default: "<code>en</code>" ja, uns gefällt Tweet besser als Twittern)</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</li>
|
|
||||||
<li id="options_gplus">
|
|
||||||
<table summary="Eine Auflistung aller Optionen für Google+ des socialSharePrivacy-Plug-Ins">
|
|
||||||
<caption>Optionen: Google+</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Option</th>
|
|
||||||
<th>Standardwert</th>
|
|
||||||
<th>Beschreibung</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>status</td>
|
|
||||||
<td>on</td>
|
|
||||||
<td>Der User hat Google+ zur Auswahl</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>dummy_img</td>
|
|
||||||
<td>socialshareprivacy/images/dummy_gplus.png</td>
|
|
||||||
<td>Pfad zur statischen Grafik</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>txt_info</td>
|
|
||||||
<td><em>Text</em></td>
|
|
||||||
<td>MouseOver-Text des „+1“-Buttons</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>txt_gplus_off</td>
|
|
||||||
<td>nicht mit Google+ verbunden</td>
|
|
||||||
<td>Text-Entsprechung der Schalter-Grafik im ausgeschalteten Zustand, in der Regel nicht sichtbar für den User</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>txt_gplus_on</td>
|
|
||||||
<td>mit Google+ verbunden</td>
|
|
||||||
<td>Text-Entsprechung der Schalter-Grafik im eingeschalteten Zustand, in der Regel nicht sichtbar für den User</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>perma_option</td>
|
|
||||||
<td>on</td>
|
|
||||||
<td>Der User hat die Option sich Google+ dauerhaft einblenden zu lassen (mittels Cookie)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>display_name</td>
|
|
||||||
<td>Google+</td>
|
|
||||||
<td>Schreibweise des Service in den Optionen</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>referrer_track</td>
|
|
||||||
<td> </td>
|
|
||||||
<td>Wird ans Ende der URL gehängt, kann zum Tracken des Referrers genutzt werden</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>language</td>
|
|
||||||
<td>de</td>
|
|
||||||
<td>Spracheinstellung</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h2 id="examples">Beispiel-Einbindungen</h2>
|
|
||||||
<p>
|
|
||||||
Im Folgenden sehen Sie ein paar beispielhafte Einbindungen von gängigen Konfigurationen.
|
|
||||||
</p>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<h3 id="only_fb">Nur Facebook einbinden</h3>
|
|
||||||
<pre>
|
|
||||||
<code>$('#socialshareprivacy').socialSharePrivacy({
|
|
||||||
services : {
|
|
||||||
twitter : {
|
|
||||||
'status' : 'off'
|
|
||||||
},
|
|
||||||
gplus : {
|
|
||||||
'status' : 'off'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});</code>
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h3 id="no_perma">Keine Option zum dauerhaften Aktivieren anbieten</h3>
|
|
||||||
<pre>
|
|
||||||
<code>$('#socialshareprivacy').socialSharePrivacy({
|
|
||||||
services : {
|
|
||||||
facebook : {
|
|
||||||
'perma_option' : 'off'
|
|
||||||
},
|
|
||||||
twitter : {
|
|
||||||
'perma_option' : 'off'
|
|
||||||
},
|
|
||||||
gplus : {
|
|
||||||
'perma_option' : 'off'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});</code>
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h3 id="only_gplus_css_path">Nur Google+ anbieten und eigenen Pfad für die CSS-Datei angeben.</h3>
|
|
||||||
<pre>
|
|
||||||
<code>$('#socialshareprivacy').socialSharePrivacy({
|
|
||||||
services : {
|
|
||||||
facebook : {
|
|
||||||
'status' : 'off'
|
|
||||||
},
|
|
||||||
twitter : {
|
|
||||||
'status' : 'off'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'css_path' : '/style/plugins/socialshareprivacy.css'
|
|
||||||
});</code>
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h3>Mehrere 2-Klick-Buttonleisten auf einer Seite</h3>
|
|
||||||
<h4>Variante 1: Ein Aufruf des Plug-Ins mit einem entsprechenden Selektor</h4>
|
|
||||||
<pre>
|
|
||||||
<div class="anriss">
|
|
||||||
<h3><a href="http://www.heise.de">heise</a></h3>
|
|
||||||
<p>lorem ipsum</p>
|
|
||||||
<div class="social"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="anriss">
|
|
||||||
<h3><a href="http://www.heise.de/security/">heise security</a></h3>
|
|
||||||
<p>dolor sit amet</p>
|
|
||||||
<div class="social"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$(".social").socialSharePrivacy({
|
|
||||||
uri : function(context) {
|
|
||||||
return $(context).parents(".anriss").find("h3 a").attr("href");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</pre>
|
|
||||||
<h4>Variante 2: Mehrfacher Aufruf des Plug-Ins</h4>
|
|
||||||
<pre>
|
|
||||||
<div>
|
|
||||||
<h3><a href="http://www.heise.de">heise</a></h3>
|
|
||||||
<p>lorem ipsum</p>
|
|
||||||
<div id="one"></div>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
$("#one").socialSharePrivacy({
|
|
||||||
uri : "http://www.heise.de"
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h3><a href="http://www.heise.de/security/">heise security</a></h3>
|
|
||||||
<p>dolor sit amet</p>
|
|
||||||
<div id="two"></div>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
$("#two").socialSharePrivacy({
|
|
||||||
uri : "http://www.heise.de/security/"
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h2 id="url">URL</h2>
|
|
||||||
<p>
|
|
||||||
Die URL, die den Services übergeben wird, kann über eine Option gesteuert werden.<br />Standardmäßig wird eine Funktion innerhalb des Plug-Ins verwendet, die die URL der aktuellen Seite aus <code>document.location.href</code> ermittelt, ist jedoch eine kanonische URL hinterlegt (<code><link rel="canonical"></code>), wird diese genommen.
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h2 id="perma_option">Einstellungen merken</h2>
|
|
||||||
<p>
|
|
||||||
Bevor das Cookie abgefragt wird, wie die Einstellungen des Users sind, wird erstmal geprüft, wie das Plug-In konfiguriert ist. Ist das Plug-In eventuell nachträglich umgestellt worden hat der User dadurch keine Nachteile.<br />
|
|
||||||
Wurde für alle Services die Merken-Funktion ausgeschaltet (<code>'perma_option' : 'off'</code>) wird auch das Einstellungsmenü nicht mehr angezeigt.
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h2 id="licence">Lizenz</h2>
|
|
||||||
<p>
|
|
||||||
Dieses Plug-In ist unter der MIT License (<a href="http://www.opensource.org/licenses/mit-license.php">http://www.opensource.org/licenses/mit-license.php</a>) veröffentlicht und darf gerne für private, wie auch kommerzielle Zwecke genutzt werden.
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h2 id="logo">Logo</h2>
|
|
||||||
<p>
|
|
||||||
Unserem Plug-In liegt auch das von uns verwendete Logo bei, das Sie gerne zur Bewerbung dieser Aktion verwenden dürfen.
|
|
||||||
<a href="socialshareprivacy/images/2-klick-logo.jpg"><img src="2-klick-logo_min.jpg" width="150" height="150" alt="Logo 2 Klicks für mehr Datenschutz" style="float: left;" /></a>
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
4
socialshareprivacy/jquery.js
vendored
@ -1,377 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
|
|
||||||
*
|
|
||||||
* is released under the MIT License http://www.opensource.org/licenses/mit-license.php
|
|
||||||
*
|
|
||||||
* Spread the word, link to us if you can.
|
|
||||||
*/
|
|
||||||
(function ($) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* helper functions
|
|
||||||
*/
|
|
||||||
|
|
||||||
// abbreviate at last blank before length and add "\u2026" (horizontal ellipsis)
|
|
||||||
function abbreviateText(text, length) {
|
|
||||||
var abbreviated = decodeURIComponent(text);
|
|
||||||
if (abbreviated.length <= length) {
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
var lastWhitespaceIndex = abbreviated.substring(0, length - 1).lastIndexOf(' ');
|
|
||||||
abbreviated = encodeURIComponent(abbreviated.substring(0, lastWhitespaceIndex)) + "\u2026";
|
|
||||||
|
|
||||||
return abbreviated;
|
|
||||||
}
|
|
||||||
|
|
||||||
// returns content of <meta name="" content=""> tags or '' if empty/non existant
|
|
||||||
function getMeta(name) {
|
|
||||||
var metaContent = $('meta[name="' + name + '"]').attr('content');
|
|
||||||
return metaContent || '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// create tweet text from content of <meta name="DC.title"> and <meta name="DC.creator">
|
|
||||||
// fallback to content of <title> tag
|
|
||||||
function getTweetText() {
|
|
||||||
var title = getMeta('DC.title');
|
|
||||||
var creator = getMeta('DC.creator');
|
|
||||||
|
|
||||||
if (title.length > 0 && creator.length > 0) {
|
|
||||||
title += ' - ' + creator;
|
|
||||||
} else {
|
|
||||||
title = $('title').text();
|
|
||||||
}
|
|
||||||
|
|
||||||
return encodeURIComponent(title);
|
|
||||||
}
|
|
||||||
|
|
||||||
// build URI from rel="canonical" or document.location
|
|
||||||
function getURI() {
|
|
||||||
var uri = document.location.href;
|
|
||||||
var canonical = $("link[rel=canonical]").attr("href");
|
|
||||||
|
|
||||||
if (canonical && canonical.length > 0) {
|
|
||||||
if (canonical.indexOf("http") < 0) {
|
|
||||||
canonical = document.location.protocol + "//" + document.location.host + canonical;
|
|
||||||
}
|
|
||||||
uri = canonical;
|
|
||||||
}
|
|
||||||
|
|
||||||
return uri;
|
|
||||||
}
|
|
||||||
|
|
||||||
function cookieSet(name, value, days, path, domain) {
|
|
||||||
var expires = new Date();
|
|
||||||
expires.setTime(expires.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
||||||
document.cookie = name + '=' + value + '; expires=' + expires.toUTCString() + '; path=' + path + '; domain=' + domain;
|
|
||||||
}
|
|
||||||
function cookieDel(name, value, path, domain) {
|
|
||||||
var expires = new Date();
|
|
||||||
expires.setTime(expires.getTime() - 100);
|
|
||||||
document.cookie = name + '=' + value + '; expires=' + expires.toUTCString() + '; path=' + path + '; domain=' + domain;
|
|
||||||
}
|
|
||||||
|
|
||||||
// extend jquery with our plugin function
|
|
||||||
$.fn.socialSharePrivacy = function (settings) {
|
|
||||||
var defaults = {
|
|
||||||
'services' : {
|
|
||||||
'facebook' : {
|
|
||||||
'status' : 'on',
|
|
||||||
'dummy_img' : 'socialshareprivacy/images/dummy_facebook.png',
|
|
||||||
'txt_info' : '2 Klicks für mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie können Ihre Empfehlung an Facebook senden. Schon beim Aktivieren werden Daten an Dritte übertragen – siehe <em>i</em>.',
|
|
||||||
'txt_fb_off' : 'nicht mit Facebook verbunden',
|
|
||||||
'txt_fb_on' : 'mit Facebook verbunden',
|
|
||||||
'perma_option' : 'on',
|
|
||||||
'display_name' : 'Facebook',
|
|
||||||
'referrer_track' : '',
|
|
||||||
'language' : 'de_DE',
|
|
||||||
'action' : 'recommend'
|
|
||||||
},
|
|
||||||
'twitter' : {
|
|
||||||
'status' : 'on',
|
|
||||||
'dummy_img' : 'socialshareprivacy/images/dummy_twitter.png',
|
|
||||||
'txt_info' : '2 Klicks für mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie können Ihre Empfehlung an Twitter senden. Schon beim Aktivieren werden Daten an Dritte übertragen – siehe <em>i</em>.',
|
|
||||||
'txt_twitter_off' : 'nicht mit Twitter verbunden',
|
|
||||||
'txt_twitter_on' : 'mit Twitter verbunden',
|
|
||||||
'perma_option' : 'on',
|
|
||||||
'display_name' : 'Twitter',
|
|
||||||
'referrer_track' : '',
|
|
||||||
'tweet_text' : getTweetText,
|
|
||||||
'language' : 'en'
|
|
||||||
},
|
|
||||||
'gplus' : {
|
|
||||||
'status' : 'on',
|
|
||||||
'dummy_img' : 'socialshareprivacy/images/dummy_gplus.png',
|
|
||||||
'txt_info' : '2 Klicks für mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie können Ihre Empfehlung an Google+ senden. Schon beim Aktivieren werden Daten an Dritte übertragen – siehe <em>i</em>.',
|
|
||||||
'txt_gplus_off' : 'nicht mit Google+ verbunden',
|
|
||||||
'txt_gplus_on' : 'mit Google+ verbunden',
|
|
||||||
'perma_option' : 'on',
|
|
||||||
'display_name' : 'Google+',
|
|
||||||
'referrer_track' : '',
|
|
||||||
'language' : 'de'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'info_link' : 'http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html',
|
|
||||||
'txt_help' : 'Wenn Sie diese Felder durch einen Klick aktivieren, werden Informationen an Facebook, Twitter oder Google in die USA übertragen und unter Umständen auch dort gespeichert. Näheres erfahren Sie durch einen Klick auf das <em>i</em>.',
|
|
||||||
'settings_perma' : 'Dauerhaft aktivieren und Datenüber­tragung zustimmen:',
|
|
||||||
'cookie_path' : '/',
|
|
||||||
'cookie_domain' : document.location.host,
|
|
||||||
'cookie_expires' : '365',
|
|
||||||
'css_path' : 'socialshareprivacy/socialshareprivacy.css',
|
|
||||||
'uri' : getURI
|
|
||||||
};
|
|
||||||
|
|
||||||
// Standardwerte des Plug-Ings mit den vom User angegebenen Optionen ueberschreiben
|
|
||||||
var options = $.extend(true, defaults, settings);
|
|
||||||
|
|
||||||
var facebook_on = (options.services.facebook.status === 'on');
|
|
||||||
var twitter_on = (options.services.twitter.status === 'on');
|
|
||||||
var gplus_on = (options.services.gplus.status === 'on');
|
|
||||||
|
|
||||||
// check if at least one service is "on"
|
|
||||||
if (!facebook_on && !twitter_on && !gplus_on) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// insert stylesheet into document and prepend target element
|
|
||||||
if (options.css_path.length > 0) {
|
|
||||||
// IE fix (noetig fuer IE < 9 - wird hier aber fuer alle IE gemacht)
|
|
||||||
if (document.createStyleSheet) {
|
|
||||||
document.createStyleSheet(options.css_path);
|
|
||||||
} else {
|
|
||||||
$('head').append('<link rel="stylesheet" type="text/css" href="' + options.css_path + '" />');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.each(function () {
|
|
||||||
|
|
||||||
$(this).prepend('<ul class="social_share_privacy_area"></ul>');
|
|
||||||
var context = $('.social_share_privacy_area', this);
|
|
||||||
|
|
||||||
// canonical uri that will be shared
|
|
||||||
var uri = options.uri;
|
|
||||||
if (typeof uri === 'function') {
|
|
||||||
uri = uri(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Facebook
|
|
||||||
//
|
|
||||||
if (facebook_on) {
|
|
||||||
var fb_enc_uri = encodeURIComponent(uri + options.services.facebook.referrer_track);
|
|
||||||
var fb_code = '<iframe src="http://www.facebook.com/plugins/like.php?locale=' + options.services.facebook.language + '&href=' + fb_enc_uri + '&send=false&layout=button_count&width=120&show_faces=false&action=' + options.services.facebook.action + '&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:145px; height:21px;" allowTransparency="true"></iframe>';
|
|
||||||
var fb_dummy_btn = '<img src="' + options.services.facebook.dummy_img + '" alt="Facebook "Like"-Dummy" class="fb_like_privacy_dummy" />';
|
|
||||||
|
|
||||||
context.append('<li class="facebook help_info"><span class="info">' + options.services.facebook.txt_info + '</span><span class="switch off">' + options.services.facebook.txt_fb_off + '</span><div class="fb_like dummy_btn">' + fb_dummy_btn + '</div></li>');
|
|
||||||
|
|
||||||
var $container_fb = $('li.facebook', context);
|
|
||||||
|
|
||||||
$('li.facebook div.fb_like img.fb_like_privacy_dummy,li.facebook span.switch', context).live('click', function () {
|
|
||||||
if ($container_fb.find('span.switch').hasClass('off')) {
|
|
||||||
$container_fb.addClass('info_off');
|
|
||||||
$container_fb.find('span.switch').addClass('on').removeClass('off').html(options.services.facebook.txt_fb_on);
|
|
||||||
$container_fb.find('img.fb_like_privacy_dummy').replaceWith(fb_code);
|
|
||||||
} else {
|
|
||||||
$container_fb.removeClass('info_off');
|
|
||||||
$container_fb.find('span.switch').addClass('off').removeClass('on').html(options.services.facebook.txt_fb_off);
|
|
||||||
$container_fb.find('.fb_like').html(fb_dummy_btn);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Twitter
|
|
||||||
//
|
|
||||||
if (twitter_on) {
|
|
||||||
var text = options.services.twitter.tweet_text;
|
|
||||||
if (typeof text === 'function') {
|
|
||||||
text = text();
|
|
||||||
}
|
|
||||||
// 120 is the max character count left after twitters automatic url shortening with t.co
|
|
||||||
text = abbreviateText(text, '120');
|
|
||||||
|
|
||||||
var twitter_enc_uri = encodeURIComponent(uri + options.services.twitter.referrer_track);
|
|
||||||
var twitter_count_url = encodeURIComponent(uri);
|
|
||||||
var twitter_code = '<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?url=' + twitter_enc_uri + '&counturl=' + twitter_count_url + '&text=' + text + '&count=horizontal&lang=' + options.services.twitter.language + '" style="width:130px; height:25px;"></iframe>';
|
|
||||||
var twitter_dummy_btn = '<img src="' + options.services.twitter.dummy_img + '" alt=""Tweet this"-Dummy" class="tweet_this_dummy" />';
|
|
||||||
|
|
||||||
context.append('<li class="twitter help_info"><span class="info">' + options.services.twitter.txt_info + '</span><span class="switch off">' + options.services.twitter.txt_twitter_off + '</span><div class="tweet dummy_btn">' + twitter_dummy_btn + '</div></li>');
|
|
||||||
|
|
||||||
var $container_tw = $('li.twitter', context);
|
|
||||||
|
|
||||||
$('li.twitter div.tweet img,li.twitter span.switch', context).live('click', function () {
|
|
||||||
if ($container_tw.find('span.switch').hasClass('off')) {
|
|
||||||
$container_tw.addClass('info_off');
|
|
||||||
$container_tw.find('span.switch').addClass('on').removeClass('off').html(options.services.twitter.txt_twitter_on);
|
|
||||||
$container_tw.find('img.tweet_this_dummy').replaceWith(twitter_code);
|
|
||||||
} else {
|
|
||||||
$container_tw.removeClass('info_off');
|
|
||||||
$container_tw.find('span.switch').addClass('off').removeClass('on').html(options.services.twitter.txt_twitter_off);
|
|
||||||
$container_tw.find('.tweet').html(twitter_dummy_btn);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Google+
|
|
||||||
//
|
|
||||||
if (gplus_on) {
|
|
||||||
// fuer G+ wird die URL nicht encoded, da das zu einem Fehler fuehrt
|
|
||||||
var gplus_uri = uri + options.services.gplus.referrer_track;
|
|
||||||
|
|
||||||
// we use the Google+ "asynchronous" code, standard code is flaky if inserted into dom after load
|
|
||||||
var gplus_code = '<div class="g-plusone" data-size="medium" data-href="' + gplus_uri + '"></div><script type="text/javascript">window.___gcfg = {lang: "' + options.services.gplus.language + '"}; (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>';
|
|
||||||
var gplus_dummy_btn = '<img src="' + options.services.gplus.dummy_img + '" alt=""Google+1"-Dummy" class="gplus_one_dummy" />';
|
|
||||||
|
|
||||||
context.append('<li class="gplus help_info"><span class="info">' + options.services.gplus.txt_info + '</span><span class="switch off">' + options.services.gplus.txt_gplus_off + '</span><div class="gplusone dummy_btn">' + gplus_dummy_btn + '</div></li>');
|
|
||||||
|
|
||||||
var $container_gplus = $('li.gplus', context);
|
|
||||||
|
|
||||||
$('li.gplus div.gplusone img,li.gplus span.switch', context).live('click', function () {
|
|
||||||
if ($container_gplus.find('span.switch').hasClass('off')) {
|
|
||||||
$container_gplus.addClass('info_off');
|
|
||||||
$container_gplus.find('span.switch').addClass('on').removeClass('off').html(options.services.gplus.txt_gplus_on);
|
|
||||||
$container_gplus.find('img.gplus_one_dummy').replaceWith(gplus_code);
|
|
||||||
} else {
|
|
||||||
$container_gplus.removeClass('info_off');
|
|
||||||
$container_gplus.find('span.switch').addClass('off').removeClass('on').html(options.services.gplus.txt_gplus_off);
|
|
||||||
$container_gplus.find('.gplusone').html(gplus_dummy_btn);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Der Info/Settings-Bereich wird eingebunden
|
|
||||||
//
|
|
||||||
context.append('<li class="settings_info"><div class="settings_info_menu off perma_option_off"><a href="' + options.info_link + '"><span class="help_info icon"><span class="info">' + options.txt_help + '</span></span></a></div></li>');
|
|
||||||
|
|
||||||
// Info-Overlays mit leichter Verzoegerung einblenden
|
|
||||||
$('.help_info:not(.info_off)', context).live('mouseenter', function () {
|
|
||||||
var $info_wrapper = $(this);
|
|
||||||
var timeout_id = window.setTimeout(function () { $($info_wrapper).addClass('display'); }, 500);
|
|
||||||
$(this).data('timeout_id', timeout_id);
|
|
||||||
});
|
|
||||||
$('.help_info', context).live('mouseleave', function () {
|
|
||||||
var timeout_id = $(this).data('timeout_id');
|
|
||||||
window.clearTimeout(timeout_id);
|
|
||||||
if ($(this).hasClass('display')) {
|
|
||||||
$(this).removeClass('display');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var facebook_perma = (options.services.facebook.perma_option === 'on');
|
|
||||||
var twitter_perma = (options.services.twitter.perma_option === 'on');
|
|
||||||
var gplus_perma = (options.services.gplus.perma_option === 'on');
|
|
||||||
|
|
||||||
// Menue zum dauerhaften Einblenden der aktiven Dienste via Cookie einbinden
|
|
||||||
// Die IE7 wird hier ausgenommen, da er kein JSON kann und die Cookies hier ueber JSON-Struktur abgebildet werden
|
|
||||||
if (((facebook_on && facebook_perma)
|
|
||||||
|| (twitter_on && twitter_perma)
|
|
||||||
|| (gplus_on && gplus_perma))
|
|
||||||
&& (!$.browser.msie || ($.browser.msie && $.browser.version > 7.0))) {
|
|
||||||
|
|
||||||
// Cookies abrufen
|
|
||||||
var cookie_list = document.cookie.split(';');
|
|
||||||
var cookies = '{';
|
|
||||||
var i = 0;
|
|
||||||
for (; i < cookie_list.length; i += 1) {
|
|
||||||
var foo = cookie_list[i].split('=');
|
|
||||||
cookies += '"' + $.trim(foo[0]) + '":"' + $.trim(foo[1]) + '"';
|
|
||||||
if (i < cookie_list.length - 1) {
|
|
||||||
cookies += ',';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cookies += '}';
|
|
||||||
cookies = JSON.parse(cookies);
|
|
||||||
|
|
||||||
// Container definieren
|
|
||||||
var $container_settings_info = $('li.settings_info', context);
|
|
||||||
|
|
||||||
// Klasse entfernen, die das i-Icon alleine formatiert, da Perma-Optionen eingeblendet werden
|
|
||||||
$container_settings_info.find('.settings_info_menu').removeClass('perma_option_off');
|
|
||||||
|
|
||||||
// Perma-Optionen-Icon (.settings) und Formular (noch versteckt) einbinden
|
|
||||||
$container_settings_info.find('.settings_info_menu').append('<span class="settings">Einstellungen</span><form><fieldset><legend>' + options.settings_perma + '</legend></fieldset></form>');
|
|
||||||
|
|
||||||
|
|
||||||
// Die Dienste mit <input> und <label>, sowie checked-Status laut Cookie, schreiben
|
|
||||||
var checked = ' checked="checked"';
|
|
||||||
if (facebook_on && facebook_perma) {
|
|
||||||
var perma_status_facebook = cookies.socialSharePrivacy_facebook === 'perma_on' ? checked : '';
|
|
||||||
$container_settings_info.find('form fieldset').append(
|
|
||||||
'<input type="checkbox" name="perma_status_facebook" id="perma_status_facebook"'
|
|
||||||
+ perma_status_facebook + ' /><label for="perma_status_facebook">'
|
|
||||||
+ options.services.facebook.display_name + '</label>'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (twitter_on && twitter_perma) {
|
|
||||||
var perma_status_twitter = cookies.socialSharePrivacy_twitter === 'perma_on' ? checked : '';
|
|
||||||
$container_settings_info.find('form fieldset').append(
|
|
||||||
'<input type="checkbox" name="perma_status_twitter" id="perma_status_twitter"'
|
|
||||||
+ perma_status_twitter + ' /><label for="perma_status_twitter">'
|
|
||||||
+ options.services.twitter.display_name + '</label>'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gplus_on && gplus_perma) {
|
|
||||||
var perma_status_gplus = cookies.socialSharePrivacy_gplus === 'perma_on' ? checked : '';
|
|
||||||
$container_settings_info.find('form fieldset').append(
|
|
||||||
'<input type="checkbox" name="perma_status_gplus" id="perma_status_gplus"'
|
|
||||||
+ perma_status_gplus + ' /><label for="perma_status_gplus">'
|
|
||||||
+ options.services.gplus.display_name + '</label>'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cursor auf Pointer setzen fuer das Zahnrad
|
|
||||||
$container_settings_info.find('span.settings').css('cursor', 'pointer');
|
|
||||||
|
|
||||||
// Einstellungs-Menue bei mouseover ein-/ausblenden
|
|
||||||
$($container_settings_info.find('span.settings'), context).live('mouseenter', function () {
|
|
||||||
var timeout_id = window.setTimeout(function () { $container_settings_info.find('.settings_info_menu').removeClass('off').addClass('on'); }, 500);
|
|
||||||
$(this).data('timeout_id', timeout_id);
|
|
||||||
});
|
|
||||||
$($container_settings_info, context).live('mouseleave', function () {
|
|
||||||
var timeout_id = $(this).data('timeout_id');
|
|
||||||
window.clearTimeout(timeout_id);
|
|
||||||
$container_settings_info.find('.settings_info_menu').removeClass('on').addClass('off');
|
|
||||||
});
|
|
||||||
|
|
||||||
// Klick-Interaktion auf <input> um Dienste dauerhaft ein- oder auszuschalten (Cookie wird gesetzt oder geloescht)
|
|
||||||
$($container_settings_info.find('fieldset input')).live('click', function (event) {
|
|
||||||
var click = event.target.id;
|
|
||||||
var service = click.substr(click.lastIndexOf('_') + 1, click.length);
|
|
||||||
var cookie_name = 'socialSharePrivacy_' + service;
|
|
||||||
|
|
||||||
if ($('#' + event.target.id + ':checked').length) {
|
|
||||||
cookieSet(cookie_name, 'perma_on', options.cookie_expires, options.cookie_path, options.cookie_domain);
|
|
||||||
$('form fieldset label[for=' + click + ']', context).addClass('checked');
|
|
||||||
} else {
|
|
||||||
cookieDel(cookie_name, 'perma_on', options.cookie_path, options.cookie_domain);
|
|
||||||
$('form fieldset label[for=' + click + ']', context).removeClass('checked');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Dienste automatisch einbinden, wenn entsprechendes Cookie vorhanden ist
|
|
||||||
if (facebook_on && facebook_perma && cookies.socialSharePrivacy_facebook === 'perma_on') {
|
|
||||||
$('li.facebook span.switch', context).click();
|
|
||||||
}
|
|
||||||
if (twitter_on && twitter_perma && cookies.socialSharePrivacy_twitter === 'perma_on') {
|
|
||||||
$('li.twitter span.switch', context).click();
|
|
||||||
}
|
|
||||||
if (gplus_on && gplus_perma && cookies.socialSharePrivacy_gplus === 'perma_on') {
|
|
||||||
$('li.gplus span.switch', context).click();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}); // this.each(function ()
|
|
||||||
}; // $.fn.socialSharePrivacy = function (settings) {
|
|
||||||
}(jQuery));
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
|
|
||||||
*
|
|
||||||
* is released under the MIT License http://www.opensource.org/licenses/mit-license.php
|
|
||||||
*
|
|
||||||
* Spread the word, link to us if you can.
|
|
||||||
*/
|
|
||||||
(function(b){function x(b,a){var f=decodeURIComponent(b);if(f.length<=a)return b;var j=f.substring(0,a-1).lastIndexOf(" ");return f=encodeURIComponent(f.substring(0,j))+"\u2026"}function p(c){return b('meta[name="'+c+'"]').attr("content")||""}function r(){var c=p("DC.title"),a=p("DC.creator");c.length>0&&a.length>0?c+=" - "+a:c=b("title").text();return encodeURIComponent(c)}function s(){var c=document.location.href,a=b("link[rel=canonical]").attr("href");a&&a.length>0&&(a.indexOf("http")<0&&(a=document.location.protocol+
|
|
||||||
"//"+document.location.host+a),c=a);return c}b.fn.socialSharePrivacy=function(c){var a=b.extend(!0,{services:{facebook:{status:"on",dummy_img:"socialshareprivacy/images/dummy_facebook.png",txt_info:"2 Klicks für mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie können Ihre Empfehlung an Facebook senden. Schon beim Aktivieren werden Daten an Dritte übertragen – siehe <em>i</em>.",txt_fb_off:"nicht mit Facebook verbunden",txt_fb_on:"mit Facebook verbunden",
|
|
||||||
perma_option:"on",display_name:"Facebook",referrer_track:"",language:"de_DE",action:"recommend"},twitter:{status:"on",dummy_img:"socialshareprivacy/images/dummy_twitter.png",txt_info:"2 Klicks für mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie können Ihre Empfehlung an Twitter senden. Schon beim Aktivieren werden Daten an Dritte übertragen – siehe <em>i</em>.",txt_twitter_off:"nicht mit Twitter verbunden",txt_twitter_on:"mit Twitter verbunden",perma_option:"on",
|
|
||||||
display_name:"Twitter",referrer_track:"",tweet_text:r,language:"en"},gplus:{status:"on",dummy_img:"socialshareprivacy/images/dummy_gplus.png",txt_info:"2 Klicks für mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie können Ihre Empfehlung an Google+ senden. Schon beim Aktivieren werden Daten an Dritte übertragen – siehe <em>i</em>.",txt_gplus_off:"nicht mit Google+ verbunden",txt_gplus_on:"mit Google+ verbunden",perma_option:"on",display_name:"Google+",
|
|
||||||
referrer_track:"",language:"de"}},info_link:"http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html",txt_help:"Wenn Sie diese Felder durch einen Klick aktivieren, werden Informationen an Facebook, Twitter oder Google in die USA übertragen und unter Umständen auch dort gespeichert. Näheres erfahren Sie durch einen Klick auf das <em>i</em>.",settings_perma:"Dauerhaft aktivieren und Datenüber­tragung zustimmen:",cookie_path:"/",cookie_domain:document.location.host,
|
|
||||||
cookie_expires:"365",css_path:"socialshareprivacy/socialshareprivacy.css",uri:s},c),f=a.services.facebook.status==="on",j=a.services.twitter.status==="on",n=a.services.gplus.status==="on";if(f||j||n)return a.css_path.length>0&&(document.createStyleSheet?document.createStyleSheet(a.css_path):b("head").append('<link rel="stylesheet" type="text/css" href="'+a.css_path+'" />')),this.each(function(){b(this).prepend('<ul class="social_share_privacy_area"></ul>');var d=b(".social_share_privacy_area",this),
|
|
||||||
c=a.uri;typeof c==="function"&&(c=c(d));if(f){var g=encodeURIComponent(c+a.services.facebook.referrer_track),p='<iframe src="http://www.facebook.com/plugins/like.php?locale='+a.services.facebook.language+"&href="+g+"&send=false&layout=button_count&width=120&show_faces=false&action="+a.services.facebook.action+'&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:145px; height:21px;" allowTransparency="true"></iframe>',
|
|
||||||
t='<img src="'+a.services.facebook.dummy_img+'" alt="Facebook "Like"-Dummy" class="fb_like_privacy_dummy" />';d.append('<li class="facebook help_info"><span class="info">'+a.services.facebook.txt_info+'</span><span class="switch off">'+a.services.facebook.txt_fb_off+'</span><div class="fb_like dummy_btn">'+t+"</div></li>");var k=b("li.facebook",d);b("li.facebook div.fb_like img.fb_like_privacy_dummy,li.facebook span.switch",d).live("click",function(){k.find("span.switch").hasClass("off")?
|
|
||||||
(k.addClass("info_off"),k.find("span.switch").addClass("on").removeClass("off").html(a.services.facebook.txt_fb_on),k.find("img.fb_like_privacy_dummy").replaceWith(p)):(k.removeClass("info_off"),k.find("span.switch").addClass("off").removeClass("on").html(a.services.facebook.txt_fb_off),k.find(".fb_like").html(t))})}if(j){g=a.services.twitter.tweet_text;typeof g==="function"&&(g=g());var g=x(g,"120"),o=encodeURIComponent(c+a.services.twitter.referrer_track),e=encodeURIComponent(c),r='<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?url='+
|
|
||||||
o+"&counturl="+e+"&text="+g+"&count=horizontal&lang="+a.services.twitter.language+'" style="width:130px; height:25px;"></iframe>',u='<img src="'+a.services.twitter.dummy_img+'" alt=""Tweet this"-Dummy" class="tweet_this_dummy" />';d.append('<li class="twitter help_info"><span class="info">'+a.services.twitter.txt_info+'</span><span class="switch off">'+a.services.twitter.txt_twitter_off+'</span><div class="tweet dummy_btn">'+u+"</div></li>");var l=b("li.twitter",d);b("li.twitter div.tweet img,li.twitter span.switch",
|
|
||||||
d).live("click",function(){l.find("span.switch").hasClass("off")?(l.addClass("info_off"),l.find("span.switch").addClass("on").removeClass("off").html(a.services.twitter.txt_twitter_on),l.find("img.tweet_this_dummy").replaceWith(r)):(l.removeClass("info_off"),l.find("span.switch").addClass("off").removeClass("on").html(a.services.twitter.txt_twitter_off),l.find(".tweet").html(u))})}if(n){var s='<div class="g-plusone" data-size="medium" data-href="'+(c+a.services.gplus.referrer_track)+'"></div><script type="text/javascript">window.___gcfg = {lang: "'+
|
|
||||||
a.services.gplus.language+'"}; (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>',v='<img src="'+a.services.gplus.dummy_img+'" alt=""Google+1"-Dummy" class="gplus_one_dummy" />';d.append('<li class="gplus help_info"><span class="info">'+a.services.gplus.txt_info+'</span><span class="switch off">'+
|
|
||||||
a.services.gplus.txt_gplus_off+'</span><div class="gplusone dummy_btn">'+v+"</div></li>");var m=b("li.gplus",d);b("li.gplus div.gplusone img,li.gplus span.switch",d).live("click",function(){m.find("span.switch").hasClass("off")?(m.addClass("info_off"),m.find("span.switch").addClass("on").removeClass("off").html(a.services.gplus.txt_gplus_on),m.find("img.gplus_one_dummy").replaceWith(s)):(m.removeClass("info_off"),m.find("span.switch").addClass("off").removeClass("on").html(a.services.gplus.txt_gplus_off),
|
|
||||||
m.find(".gplusone").html(v))})}d.append('<li class="settings_info"><div class="settings_info_menu off perma_option_off"><a href="'+a.info_link+'"><span class="help_info icon"><span class="info">'+a.txt_help+"</span></span></a></div></li>");b(".help_info:not(.info_off)",d).live("mouseenter",function(){var a=b(this),c=window.setTimeout(function(){b(a).addClass("display")},500);b(this).data("timeout_id",c)});b(".help_info",d).live("mouseleave",function(){var a=b(this).data("timeout_id");window.clearTimeout(a);
|
|
||||||
b(this).hasClass("display")&&b(this).removeClass("display")});c=a.services.facebook.perma_option==="on";g=a.services.twitter.perma_option==="on";o=a.services.gplus.perma_option==="on";if((f&&c||j&&g||n&&o)&&(!b.browser.msie||b.browser.msie&&b.browser.version>7)){for(var i=document.cookie.split(";"),e="{",q=0;q<i.length;q+=1){var w=i[q].split("=");e+='"'+b.trim(w[0])+'":"'+b.trim(w[1])+'"';q<i.length-1&&(e+=",")}e+="}";var e=JSON.parse(e),h=b("li.settings_info",d);h.find(".settings_info_menu").removeClass("perma_option_off");
|
|
||||||
h.find(".settings_info_menu").append('<span class="settings">Einstellungen</span><form><fieldset><legend>'+a.settings_perma+"</legend></fieldset></form>");f&&c&&(i=e.socialSharePrivacy_facebook==="perma_on"?' checked="checked"':"",h.find("form fieldset").append('<input type="checkbox" name="perma_status_facebook" id="perma_status_facebook"'+i+' /><label for="perma_status_facebook">'+a.services.facebook.display_name+"</label>"));j&&g&&(i=e.socialSharePrivacy_twitter==="perma_on"?' checked="checked"':
|
|
||||||
"",h.find("form fieldset").append('<input type="checkbox" name="perma_status_twitter" id="perma_status_twitter"'+i+' /><label for="perma_status_twitter">'+a.services.twitter.display_name+"</label>"));n&&o&&(i=e.socialSharePrivacy_gplus==="perma_on"?' checked="checked"':"",h.find("form fieldset").append('<input type="checkbox" name="perma_status_gplus" id="perma_status_gplus"'+i+' /><label for="perma_status_gplus">'+a.services.gplus.display_name+"</label>"));h.find("span.settings").css("cursor","pointer");
|
|
||||||
b(h.find("span.settings"),d).live("mouseenter",function(){var a=window.setTimeout(function(){h.find(".settings_info_menu").removeClass("off").addClass("on")},500);b(this).data("timeout_id",a)});b(h,d).live("mouseleave",function(){var a=b(this).data("timeout_id");window.clearTimeout(a);h.find(".settings_info_menu").removeClass("on").addClass("off")});b(h.find("fieldset input")).live("click",function(c){var e=c.target.id,g="socialSharePrivacy_"+e.substr(e.lastIndexOf("_")+1,e.length);if(b("#"+c.target.id+
|
|
||||||
":checked").length){var c=a.cookie_expires,h=a.cookie_path,f=a.cookie_domain,i=new Date;i.setTime(i.getTime()+c*864E5);document.cookie=g+"=perma_on; expires="+i.toUTCString()+"; path="+h+"; domain="+f;b("form fieldset label[for="+e+"]",d).addClass("checked")}else c=a.cookie_path,h=a.cookie_domain,f=new Date,f.setTime(f.getTime()-100),document.cookie=g+"=perma_on; expires="+f.toUTCString()+"; path="+c+"; domain="+h,b("form fieldset label[for="+e+"]",d).removeClass("checked")});f&&c&&e.socialSharePrivacy_facebook===
|
|
||||||
"perma_on"&&b("li.facebook span.switch",d).click();j&&g&&e.socialSharePrivacy_twitter==="perma_on"&&b("li.twitter span.switch",d).click();n&&o&&e.socialSharePrivacy_gplus==="perma_on"&&b("li.gplus span.switch",d).click()}})}})(jQuery);
|
|
Before Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 668 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 658 B |
Before Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 1.3 KiB |
@ -1,226 +0,0 @@
|
|||||||
.social_share_privacy_area {
|
|
||||||
clear: both;
|
|
||||||
margin: 20px 0 !important;
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0 !important;
|
|
||||||
width: auto;
|
|
||||||
height: 25px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.social_share_privacy_area li {
|
|
||||||
margin: 0 !important;
|
|
||||||
padding: 0 !important;
|
|
||||||
height: 21px;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
.social_share_privacy_area li .dummy_btn {
|
|
||||||
float: left;
|
|
||||||
margin: 0 0 0 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 0;
|
|
||||||
height: inherit;
|
|
||||||
}
|
|
||||||
.social_share_privacy_area li div iframe {
|
|
||||||
overflow: hidden;
|
|
||||||
height: inherit;
|
|
||||||
width: inherit;
|
|
||||||
}
|
|
||||||
/* Facebook begin */
|
|
||||||
.social_share_privacy_area .facebook {
|
|
||||||
width: 180px;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
.social_share_privacy_area .facebook .fb_like iframe {
|
|
||||||
width: 145px;
|
|
||||||
}
|
|
||||||
/* Facebook end */
|
|
||||||
/* Twitter begin */
|
|
||||||
.social_share_privacy_area .twitter {
|
|
||||||
width: 148px;
|
|
||||||
}
|
|
||||||
.social_share_privacy_area li div.tweet {
|
|
||||||
width: 115px;
|
|
||||||
}
|
|
||||||
/* Twitter end */
|
|
||||||
/* Google+ begin */
|
|
||||||
.social_share_privacy_area .gplus {
|
|
||||||
width: 123px;
|
|
||||||
}
|
|
||||||
.social_share_privacy_area 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;
|
|
||||||
float: left;
|
|
||||||
margin: 4px 0 0;
|
|
||||||
padding: 0;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.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.help_info .info,
|
|
||||||
.social_share_privacy_area li .help_info.icon .info {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 40px;
|
|
||||||
left: 0;
|
|
||||||
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 li.gplus.help_info .info {
|
|
||||||
left: -60px;
|
|
||||||
}
|
|
||||||
.social_share_privacy_area li .help_info.icon .info {
|
|
||||||
left: -243px;
|
|
||||||
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;
|
|
||||||
z-index: 1000;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.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: inline-block;
|
|
||||||
float: left;
|
|
||||||
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 */
|
|
@ -6,29 +6,6 @@
|
|||||||
<p>Auf diesen Seiten haben angehende THW-Helfer die Möglichkeit, alle
|
<p>Auf diesen Seiten haben angehende THW-Helfer die Möglichkeit, alle
|
||||||
theoretischen Fragen des schriftlichen Teils der Grundausbildungs-Prüfung zu lernen und zu üben.</p>
|
theoretischen Fragen des schriftlichen Teils der Grundausbildungs-Prüfung zu lernen und zu üben.</p>
|
||||||
|
|
||||||
<script type="text/javascript" src="socialshareprivacy/jquery.socialshareprivacy.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
jQuery(document).ready(function ($) {
|
|
||||||
if ($('#socialshareprivacy').length > 0) {
|
|
||||||
$('#socialshareprivacy').socialSharePrivacy({
|
|
||||||
css_path: 'socialshareprivacy/socialshareprivacy/socialshareprivacy.css',
|
|
||||||
uri: 'http://www.thw-theorie.de/',
|
|
||||||
services: {
|
|
||||||
facebook: {
|
|
||||||
'dummy_img': 'socialshareprivacy/socialshareprivacy/images/dummy_facebook.png'
|
|
||||||
},
|
|
||||||
twitter: {
|
|
||||||
'dummy_img': 'socialshareprivacy/socialshareprivacy/images/dummy_twitter.png'
|
|
||||||
},
|
|
||||||
gplus: {
|
|
||||||
'dummy_img': 'socialshareprivacy/socialshareprivacy/images/dummy_gplus.png'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<div id="socialshareprivacy"></div>
|
|
||||||
<div class="rubrik"><span>Neuigkeiten</span></div>
|
<div class="rubrik"><span>Neuigkeiten</span></div>
|
||||||
|
|
||||||
<h2>Aktualisierte Fragen</h2>
|
<h2>Aktualisierte Fragen</h2>
|
||||||
|