Skip to content

Instantly share code, notes, and snippets.

@geokat
Created June 11, 2010 07:57
Show Gist options
  • Select an option

  • Save geokat/434223 to your computer and use it in GitHub Desktop.

Select an option

Save geokat/434223 to your computer and use it in GitHub Desktop.
var wrapped_postComment_onSuccess = Dsq.Templates.postComment_onSuccess;
Dsq.Templates.postComment_onSuccess = function() {
try {
var YWATracker = YWA.getTracker("10001299646087");
YWATracker.setAction("02");
YWATracker.submit_action();
} catch(e) {}
if ($('disqus-share').checked) {
var activity = new RPXNOW.Social.Activity("Share your comment",
"commented on \"Cut, sweep, send: Salons ship hair hoping to help in Gulf cleanup\" on bakersfield.com",
"http://www.bakersfield.com/news/local/x1008891393/Cut-sweep-send-Salons-ship-hair-hoping-to-help-in-Gulf-cleanup");
try {
var message = arguments[0]['message']['post_meta']['message'];
message = message.stripTags().escapeHTML();
activity.setUserGeneratedContent(message);
} catch(e) {}
RPXNOW.Social.publishActivity(activity);
}
return wrapped_postComment_onSuccess.apply(this, arguments);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment