1 2 3$(function () { 4 5 $(".recipe-social-pinterest").click(function (e) { 6 7 e.preventDefault(); 8 window.open(buildPinterestBtn(), '_blank', 'width = 800, height = 600'); 9 10 }); 11 12// FADE OUT LANDING PAGE VIDEO OVERLAY 13 14 $('.video-landing-button').click(function () { 15 16 $('.video-landing-button img').fadeTo(500, 0, function (ev) { 17 $(".video-content-landing div iframe").fadeIn("fast"); 18 $('.video-landing-button img').css("visibility", "hidden"); 19 $('#video-landing')[0].src += "&autoplay=1"; 20 ev.preventDefault(); 21 }); 22 }); 23 24 25 // if ( $(window).width() <= 767 ){ 26 $("#static-filter h5").click(function () { 27 if (!$("#static-filter ul").hasClass("show")) { 28 $("#static-filter ul").addClass("show"); 29 $("#static-filter h5").addClass("downchevron"); 30 } else { 31 $("#static-filter ul").removeClass("show"); 32 $("#static-filter h5").removeClass("downchevron"); 33 } 34 }); 35 // } 36 37 $("#sticky-filter h5").click(function () { 38 if (!$("#sticky-filter ul").hasClass("show")) { 39 $("#sticky-filter ul").addClass("show"); 40 $("#sticky-filter h5").addClass("downchevron"); 41 } else { 42 $("#sticky-filter ul").removeClass("show"); 43 $("#sticky-filter h5").removeClass("downchevron"); 44 } 45 }); 46 47 48 49 50 $(".recipe-social-twitter").click(function () { 51 52 var postHeading = $(".recipeDetails-synopsis h1").text(); 53 $(this).attr('href', this.href + '?text=' + postHeading); 54 window.open(this.href, 'Twitter', 'width = 800, height = 600'); 55 return false; 56 57 }); 58 59 $(".ref_fb").click(function () { 60 61 window.fbAsyncInit = function () { 62 63 FB.init({ 64 appId: 300098933520745, 65 status: true, 66 cookie: true, 67 xfbml: true, 68 oauth: true, 69 }); 70 71 //Authenticate a user login 72 73 74 FB.Event.subscribe('auth.login', function (response) { 75 76 window.location.reload(); 77 78 }); 79 80 //Authenticate a user logout 81 82 FB.Event.subscribe('auth.logout', function (response) { 83 84 window.location.reload(); 85 86 }); 87 88 }; 89 90 (function (d) { 91 92 var js, id = 'facebook-jssdk'; 93 if (d.getElementById(id)) { 94 return; 95 } 96 97 js = d.createElement('script'); 98 js.id = id; 99 js.async = true; 100 101 102 js.src = "//connect.facebook.net/en_US/all.js"; 103 104 105 d.getElementsByTagName('head')[0].appendChild(js); 106 107 108 }(document)); 109 110 var postHeading = $(".recipeDetails-synopsis h1").text(); 111 var description = ''; 112 var shareImage = $("#recipe-header img")[0].src; 113 var postHeading = $("#recipes-main h1").text(); 114 var shareUrl = document.URL; 115 var shareCaption = 'Gay Lea Foods'; 116 117 FB.ui({ 118 method: 'feed', 119 name: postHeading, 120 link: document.URL, 121 picture: shareImage, 122 caption: shareCaption, 123 description: description 124 }, function (response) { 125 if (response && response.post_id) { 126 } else { 127 } 128 129 }); 130 131 }); 132 133 134}); 135 136 137 138function buildPinterestBtn() { 139 140 141 var buttonUrl = 'https://www.pinterest.com/pin/create/button/'; 142 var url = document.URL; 143 var urlEnc = encodeURIComponent(url); 144 var shareImage = $("#recipe-header img")[0].src; 145 var shareImageEnc = encodeURIComponent(shareImage); 146 var description = $("#recipes-main h1").text(); 147 var pinterestUrl = buttonUrl + '?url=' + urlEnc + '&media=' + shareImageEnc + '&description=' + encodeURI(description); 148 return pinterestUrl; 149 150 151} 152 153 154
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.