Valerii Vasin (valerii) wrote in changelog,
Valerii Vasin
valerii
changelog

[livejournal] r23320: LJSUP-14013: [Friends Feed] Refactoring ...

Committer: vvasin
LJSUP-14013: [Friends Feed] Refactoring of LJShare. Provide share widget.
U   trunk/htdocs/js/journal.js
Modified: trunk/htdocs/js/journal.js
===================================================================
--- trunk/htdocs/js/journal.js	2012-11-19 10:36:29 UTC (rev 23319)
+++ trunk/htdocs/js/journal.js	2012-11-19 12:03:09 UTC (rev 23320)
@@ -184,9 +184,18 @@
 // Share at some S2 styles
 jQuery(document).click(function(e)
 {
-	var a = e.target,
-		href = a.href,
-		args;
+	'use strict';
+
+	var a, href, args;
+
+	// exit if sharing widget is on the page
+	if (jQuery.fn.share) {
+		return;
+	}
+
+	a = e.target;
+	href = a.href;
+
 	if (href && !a.shareClickIgnore) {
 		if (href.indexOf('http://www.facebook.com/sharer.php') === 0) {
 			LJShare.entry({url: decodeURIComponent(LiveJournal.parseGetArgs(href).u)})

Tags: invis89, js, livejournal, vvasin
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