1/*
2 * jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz
3 *
4 * Copyright (c) 2012 Mathias Panzenböck
5 *
6 * is released under the MIT License http://www.opensource.org/licenses/mit-license.php
7 *
8 * Spread the word, link to us if you can.
9 */
10(function ($, undefined) {
11	"use strict";
12
13	$.extend($.fn.socialSharePrivacy.settings, {
14		// Set perma_option to true.
15		// Initially it is only set to true if jQuery.cookie is available.
16		perma_option: true,
17		set_perma_option: function (service_name) {
18			localStorage.setItem('socialSharePrivacy_'+service_name, 'perma_on');
19		},
20		del_perma_option: function (service_name) {
21			localStorage.removeItem('socialSharePrivacy_'+service_name);
22		},
23		// Only one of the two methods "get_perma_options" and "get_perma_option" has
24		// to be implemented. Though the other has to be set to null, so the default
25		// cookie based method is not used.
26		get_perma_options: null,
27		get_perma_option: function (service_name) {
28			return localStorage.getItem('socialSharePrivacy_'+service_name) === 'perma_on';
29		}
30	});
31})(jQuery);
32