Alexander Nazarov (nfokz) wrote in changelog,
Alexander Nazarov
nfokz
changelog

[livejournal] r23157: LJSUP-13843: Tumblr on lj-like and shari...

Committer: anazarov
LJSUP-13843: Tumblr on lj-like and sharing
U   trunk/htdocs/js/livejournal.js
Modified: trunk/htdocs/js/livejournal.js
===================================================================
--- trunk/htdocs/js/livejournal.js	2012-10-16 21:27:35 UTC (rev 23156)
+++ trunk/htdocs/js/livejournal.js	2012-10-17 06:06:39 UTC (rev 23157)
@@ -477,6 +477,20 @@
 		link.replaceWith(iframe);
 	});
 
+	jQuery('a.tumblr-share-button', ctx || document).each(function () {
+		if (this.href !== 'http://tumblr.com/share/link') {
+			return;
+		}
+
+		var link = jQuery(this),
+			params = {
+				url: link.attr('data-url'),
+				name: link.attr('data-title')
+			};
+
+		link.attr('href', LiveJournal.constructUrl(link.attr('href'), params));
+	});
+
 	jQuery('div.lj-like-item-repost > a', ctx || document).each(function() {
 		var link = jQuery(this),
 			url = link.data('url');

Tags: anazarov, js, livejournal, nfokz
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments