From 61eba61e64ca2daec8ade071eaf5ef632b819018 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 8 Jun 2015 15:21:51 -0400 Subject: fb share --- site/public/assets/javascripts/_env.js | 4 +++- site/templates/index.liquid | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index 6748409..7ee9255 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -747,11 +747,13 @@ var Share = { // var msg = $(".postname").html() // var url = "https://www.facebook.com/share.php?u=" + encodeURIComponent(link) + "&t=" + encodeURIComponent(msg) // window.open(url, "_blank") + + var picture = $(".gallery img").first().attr("src") || ($(".gallery .underlay").css('background-image') || "").replace("url(","").replace(")","") || "http://twohustlers.com/assets/images/2H_LOGOMARK.png" FB.ui({ method: 'feed', link: window.location.href, caption: $(".postname").html(), - picture: $(".gallery img").first().attr("src"), + picture: picture, }, function(response){}); }, diff --git a/site/templates/index.liquid b/site/templates/index.liquid index 8dbac5c..a609ceb 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -67,15 +67,12 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends. -\ + - - - -- cgit v1.2.3-70-g09d2