social-likes-nojq/contrib/livejournal.html

46 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html lang="ru-RU">
<head>
<meta charset="utf-8">
<title>Social Likes LiveJournal button</title>
<link href="../social-likes_classic.css" rel="stylesheet">
<script src="http://yandex.st/jquery/1.9.1/jquery.min.js"></script>
<script src="../social-likes.min.js"></script>
<!-- LiveJournal button CSS -->
<link href="css/livejournal.css" rel="stylesheet">
</head>
<body>
<h3>LiveJournal button</h3>
<script>
var socialLikesButtons = {
livejournal: {
click: function() {
var html = this.widget.data('html')
.replace(/{url}/g, this.options.url)
.replace(/{title}/g, this.options.title)
.replace(/&/g, '&amp;')
.replace(/"/g, '&quot;');
var form = $(
'<form action="http://www.livejournal.com/update.bml" method="post" target="_blank" accept-charset="UTF-8">' +
'<input type="hidden" name="mode" value="full">' +
'<input type="hidden" name="subject" value="' + this.options.title + '">' +
'<input type="hidden" name="event" value="' + html + '">' +
'</form>'
);
form.submit();
}
}
};
</script>
<ul class="social-likes">
<li class="livejournal" title="Share link on LiveJournal" data-html="&lt;a href='{url}'&gt;{title}&lt;/a&gt;">LiveJournal</li>
</ul>
</body>
</html>