https://coalitionagainstdomesticviolence.org/wp-content/plugins/fe…/feeds/js/fts-global.js?ver=3.0.1
1jQuery(document).ready(function() { 2 3 // Run our funtion after the page has finished loading to retrieve our external urls meta tag details. 4 fts_external_link_meta_content(); 5 6 jQuery('.fts-youtube-scrollable, .youtube-comments-wrap-premium, .youtube-comments-thumbs').hover(function() { 7 jQuery("body").css("overflow","hidden"); 8 }, function() { 9 jQuery("body").css("overflow","auto"); 10 }); 11 12 13 jQuery( document ).on( 'keydown', function ( e ) { 14 if ( e.keyCode === 27 ) { // ESC 15 jQuery( ".fts-youtube-scrollable" ).removeClass( "fts-scrollable-function" ); 16 jQuery('.youtube-comments-thumbs').hide(); 17 jQuery('.fts-youtube-scrollable, .fts-fb-autoscroll-loader').show(); 18 jQuery('.fts-youtube-thumbs-gallery-master .youtube-comments-thumbs').html(''); 19 slickremixImageResizing(); 20 } 21 }); 22 23 jQuery.fn.ftsShare = function() { 24 jQuery('.fts-share-wrap').each(function() { 25 var $self = jQuery(this); 26 //Share toolip function 27 $self.find('.ft-gallery-link-popup').unbind().bind('click', function() { 28 $self.find('.ft-gallery-share-wrap').toggle(); 29 }); 30 }); 31 }; 32 // return our share function after page has loaded to speed things up. Plus this way we can recall it in the loadmore areas of each feed instead of duplicating all the js. 33 if (jQuery.fn.ftsShare) { 34 jQuery.fn.ftsShare(); 35 } 36 37 if (navigator.userAgent.indexOf("Firefox") > 0) {} else { 38 jQuery(".fts-instagram-popup-half video, .fts-simple-fb-wrapper video, .fts-slicker-facebook-posts video, .fts-fluid-videoWrapper-html5 video").click(function() { 39 jQuery(this).trigger(this.paused ? this.paused ? "play" : "play" : "pause") 40 }) 41 } 42 if (jQuery.fn.masonry) { 43 jQuery(".fts-slicker-instagram").masonry({ 44 itemSelector: ".fts-masonry-option" 45 }) 46 } 47}); 48if (!jQuery.trim(jQuery('.fts-jal-fb-group-display').html()).length) { 49 jQuery('.fts-jal-fb-group-display').append('<div class="fts-facebook-add-more-posts-notice"><p>Please go to the <strong>Facebook Options</strong> page of our plugin and look for the "<strong>Change Post Limit</strong>" option and add the number <strong>7</strong> or more. You can also hide this notice on the Facebook Options page if you want.</p>If you are trying to add a Personal Facebook feed and you are seeing this message too, please note: <strong>Personal Facebook Accounts generally do not work with our plugin.</strong></div>') 50} 51jQuery(window).on('load', function() { 52 if (jQuery.fn.masonry) { 53 setTimeout(function () { 54 jQuery(".fts-pinterest-wrapper.masonry").masonry("layout"); 55 }, 200); 56 } 57}); 58 59// https://www.w3schools.com/js/js_comparisons.asp 60// > greater than x > 8 true 61// < less than x < 8 true 62// https://www.slickremix.com/betablog/2017/09/20200/ 63 64jQuery(document).ready(slickremixImageResizing); 65jQuery(window).on('resize',slickremixImageResizing); 66 67function slickremixImageResizing() { 68 // This is the container for our instagram images 69 var ftsBlockCenteredAttr = jQuery('.fts-instagram-inline-block-centered'); 70 // var ftsname = arguments["0"] 71 // var ftsBlockCenteredAttr = jQuery(ftsname); 72 73 74 // alert(ftsBlockCenteredAttr); 75 76 // This is the container for the instagram image post 77 var ftsImageSize = jQuery('.slicker-instagram-placeholder'); 78 79 // How many colums do we want to show 80 var ftsInstagramColumns = ftsBlockCenteredAttr.attr('data-ftsi-columns'); 81 // The margin in between photos so we can subtract that from the total % 82 var ftsInstagramMargin = ftsBlockCenteredAttr.attr('data-ftsi-margin'); 83 // The margin without the px and we multiply it by 2 because the margin is on the left and right 84 var ftsInstagramMarginfinal = parseFloat(ftsInstagramMargin) * 2; 85 // Get the Instagram container .width() so we can keep track of the container size 86 var ftsContainerWidth = ftsBlockCenteredAttr.width(); 87 // Force columns so the images to not scale up from 376px-736px. 88 // This keeps the aspect ratio for the columns and is in the if statements below where you will see ftsContainerWidth <= '376' && ft
88sForceColumns === 'no' and ftsContainerWidth <= '736' && ftsForceColumns === 'no' 89 var ftsForceColumns = ftsBlockCenteredAttr.attr('data-ftsi-force-columns'); 90 // we or each option so if someone tries something other than that it will go to else statement 91 if (ftsInstagramColumns === '1' || 92 ftsInstagramColumns === '2' || 93 ftsInstagramColumns === '3' || 94 ftsInstagramColumns === '4' || 95 ftsInstagramColumns === '5' || 96 ftsInstagramColumns === '6' || 97 ftsInstagramColumns === '7' || 98 ftsInstagramColumns === '8') { 99 // alert('wtf'); 100 // if the container is 376px or less we force the image size to be 100% 101 if (ftsContainerWidth <= '376' && ftsForceColumns === 'no') { 102 var og_size = 'calc(100% - ' + ftsInstagramMarginfinal + 'px)'; 103 } 104 // if the container is 736px or less we force the image size to be 50% 105 else if (ftsContainerWidth <= '736' && ftsForceColumns === 'no') { 106 var og_size = 'calc(50% - ' + ftsInstagramMarginfinal + 'px)'; 107 } 108 else { 109 if (ftsInstagramColumns === '8') { 110 var og_size = 'calc(12.5% - ' + ftsInstagramMarginfinal + 'px)'; 111 } 112 else if (ftsInstagramColumns === '7') { 113 var og_size = 'calc(14.28571428571429% - ' + ftsInstagramMarginfinal + 'px)'; 114 } 115 else if (ftsInstagramColumns === '6') { 116 var og_size = 'calc(16.66666666666667% - ' + ftsInstagramMarginfinal + 'px)'; 117 } 118 else if (ftsInstagramColumns === '5') { 119 var og_size = 'calc(20% - ' + ftsInstagramMarginfinal + 'px)'; 120 } 121 else if (ftsInstagramColumns === '4') { 122 var og_size = 'calc(25% - ' + ftsInstagramMarginfinal + 'px)'; 123 } 124 else if (ftsInstagramColumns === '3') { 125 var og_size = 'calc(33.33333333333333% - ' + ftsInstagramMarginfinal + 'px)'; 126 } 127 else if (ftsInstagramColumns === '2') { 128 var og_size = 'calc(50% - ' + ftsInstagramMarginfinal + 'px)'; 129 } 130 else if (ftsInstagramColumns === '1') { 131 var og_size = 'calc(100% - ' + ftsInstagramMarginfinal + 'px)'; 132 } 133 } 134 135 ftsImageSize.css({'width': og_size}); 136 137 var ftsImageHeight = ftsImageSize.width(); 138 ftsImageSize.css({ 139 'width': og_size, 140 'height': ftsImageHeight, 141 'margin': ftsInstagramMargin 142 }); 143 } 144 else { 145 var ftsImageWidth = ftsBlockCenteredAttr.attr('data-ftsi-width') ? ftsBlockCenteredAttr.attr('data-ftsi-width') : '325px'; 146 // alert(ftsImageSize.width()) 147 ftsImageSize.css({ 148 'width': ftsImageWidth, 149 'height': ftsImageWidth, 150 'margin': ftsInstagramMargin 151 }); 152 } 153 154 // If our image square is less than 180px then we hide the date, share option, hearts and comments count and icon and make the whole area clickable. 155 if (ftsImageSize.width() < 180) { 156 jQuery('.fts-instagram-inline-block-centered .slicker-date, .fts-instagram-inline-block-centered .fts-insta-likes-comments-grab-popup').hide(); 157 jQuery('.slicker-instagram-placeholder').addClass('fts-smallerthan-180'); 158 159 } 160 else { 161 jQuery('.fts-instagram-inline-block-centered .slicker-date, .fts-instagram-inline-block-centered .fts-insta-likes-comments-grab-popup').show(); 162 jQuery('.slicker-instagram-placeholder, .slicker-youtube-placeholder').removeClass('fts-smallerthan-180'); 163 164 } 165} 166 167// https://www.w3schools.com/js/js_comparisons.asp 168// > greater than x > 8 true 169// < less than x < 8 true 170// https://www.slickremix.com/betablog/2017/09/20200/ 171 172jQuery(document).ready(slickremixImageResizingFacebook, slickremixImageResizingFacebook2, slickremixImageResizingFacebook3); 173jQuery(window).on('resize',slickremixImageResizingFacebook, slickremixImageResizingFacebook2, slickremixImageResizingFacebook3); 174 175function slickremixImageResizingFacebook() { 176 // This is the container for our instagram images 177 var ftsBlockCenteredAttr = jQuery('.fts-facebook-inline-block-centered'); 178 // var ftsname = arguments["0"] 179 // var ftsBlockCenteredAttr = jQuery(ftsname); 180 181 182 // alert(ftsBlockCenteredAttr); 183 184 // This is the container for the instagram image post 185 var ftsImageSize = jQuery('.slicker-facebook-placeholder'); 186 187 // How many colums do we want to show 188 var ftsInstagramColumns = ftsBlockCenteredAttr.attr('data-ftsi-columns'); 189 // The margin in between photos so we can subtract that from the total % 190 var ftsInstagramMargin = ftsBlockCenteredAttr.attr('data-ftsi-margin'); 191 // The margin without the px and we multiply it by 2 because the margin is on the left and right 192 var ftsInstagramMarginfinal = parseFloat(ftsInstagramMargin) * 1; 193 // Get the Instagram container .width() so we can keep track of the container size 194 var ftsContainerWidth = ftsBlockCenteredAttr.width(); 195 // Force columns so the images to not scale up from 376px-736px. 196 // This keeps the aspect ratio for the columns and is in the if statements below where you will see ftsContainerWidth <= '376' && ft
196sForceColumns === 'no' and ftsContainerWidth <= '736' && ftsForceColumns === 'no' 197 var ftsForceColumns = 'yes'; 198 // we or each option so if someone tries something other than that it will go to else statement 199 if (ftsInstagramColumns === '2' || 200 ftsInstagramColumns === '3') { 201 202 if (ftsInstagramColumns === '3') { 203 var og_size = 'calc(33.0777777% - ' + ftsInstagramMarginfinal + 'px)'; 204 } 205 else if (ftsInstagramColumns === '2') { 206 var og_size = 'calc(49.777777% - ' + ftsInstagramMarginfinal + 'px)'; 207 } 208 209 210 ftsImageSize.css({'width': og_size}); 211 212 var ftsImageHeight = ftsImageSize.width(); 213 ftsImageSize.css({ 214 'width': og_size, 215 'height': ftsImageHeight, 216 'margin': ftsInstagramMargin 217 }); 218 } 219 else { 220 var ftsImageWidth = ftsBlockCenteredAttr.attr('data-ftsi-width') ? ftsBlockCenteredAttr.attr('data-ftsi-width') : '325px'; 221 // alert(ftsImageSize.width()) 222 ftsImageSize.css({ 223 'width': ftsImageWidth, 224 'height': ftsImageWidth, 225 'margin': ftsInstagramMargin 226 }); 227 } 228 229 // If our image square is less than 180px then we hide the date, share option, hearts and comments count and icon and make the whole area clickable. 230 if (ftsImageSize.width() < 180) { 231 jQuery('.fts-facebook-inline-block-centered .slicker-date, .fts-facebook-inline-block-centered .fts-insta-likes-comments-grab-popup').hide(); 232 jQuery('.slicker-facebook-placeholder').addClass('fts-smallerthan-180'); 233 234 } 235 else { 236 jQuery('.fts-facebook-inline-block-centered .slicker-date, .fts-facebook-inline-block-centered .fts-insta-likes-comments-grab-popup').show(); 237 jQuery('.slicker-facebook-placeholder, .slicker-youtube-placeholder').removeClass('fts-smallerthan-180'); 238 239 } 240} 241 242function slickremixImageResizingFacebook2() { 243 var e = jQuery(".fts-more-photos-2-or-3-photos a"), 244 t = "calc(49.88888888% - 1px)"; 245 e.css({ 246 width: t 247 }); 248 var s = e.width(); 249 e.css({ 250 width: t, 251 height: s, 252 margin: "1px" 253 }) 254} 255 256function slickremixImageResizingFacebook3() { 257 var e = jQuery(".fts-more-photos-4-photos a"), 258 t = "calc(33.192222222% - 1px)"; 259 e.css({ 260 width: t 261 }); 262 var s = e.width(); 263 e.css({ 264 width: t, 265 height: s, 266 margin: "1px" 267 }) 268} 269 270// https://www.w3schools.com/js/js_comparisons.asp 271// > greater than x > 8 true 272// < less than x < 8 true 273// https://www.slickremix.com/betablog/2017/09/20200/ 274 275jQuery(document).ready(slickremixImageResizingYouTube); 276jQuery(window).on('resize',slickremixImageResizingYouTube); 277function slickremixImageResizingYouTube() { 278 // This is the container for our instagram images 279 var ftsBlockCenteredAttr = jQuery('.fts-youtube-inline-block-centered'); 280 281 // This is the container for the instagram image post 282 var ftsYoutubeImageSize = jQuery('.slicker-youtube-placeholder'); 283 var ftsYoutubeThumbsContainer = jQuery('.fts-youtube-popup-gallery'); 284 285 var ftsYoutubeLarge = jQuery('.fts-yt-large'); 286 var ftsYoutubeThumbsWrap = jQuery('.fts-youtube-scrollable.fts-youtube-thumbs-wrap, .fts-youtube-scrollable.fts-youtube-thumbs-wrap-left, .youtube-comments-wrap-premium, .youtube-comments-wrap.fts-youtube-thumbs-wrap-right, .youtube-comments-wrap.fts-youtube-thumbs-wrap-left'); 287 288 // How many colums do we want to show 289 var ftsInstagramColumns = ftsBlockCenteredAttr.attr('data-ftsi-columns'); 290 // The margin in between photos so we can subtract that from the total % 291 var ftsInstagramMargin = ftsBlockCenteredAttr.attr('data-ftsi-margin'); 292 // The margin without the px and we multiply it by 2 because the margin is on the left and right 293 var ftsInstagramMarginfinal = parseFloat(ftsInstagramMargin) * 2; 294 // Get the Instagram container .width() so we can keep track of the container size 295 var ftsContainerWidth = ftsBlockCenteredAttr.width(); 296 // Force columns so the images to not scale up from 376px-736px. 297 // This keeps the aspect ratio for the columns and is in the if statements below where you will see ftsContainerWidth <= '376' && ft
297sForceColumns === 'no' and ftsContainerWidth <= '736' && ftsForceColumns === 'no' 298 var ftsForceColumns = ftsBlockCenteredAttr.attr('data-ftsi-force-columns'); 299 // we or each option so if someone tries something other than that it will go to else statement 300 if (ftsInstagramColumns === '1' || 301 ftsInstagramColumns === '2' || 302 ftsInstagramColumns === '3' || 303 ftsInstagramColumns === '4' || 304 ftsInstagramColumns === '5' || 305 ftsInstagramColumns === '6') { 306 // alert('wtf'); 307 // if the container is 376px or less we force the image size to be 100% 308 if (ftsContainerWidth <= '376' && ftsForceColumns === 'no') { 309 var og_size = 'calc(100% - ' + ftsInstagramMarginfinal + 'px)'; 310 } 311 // if the container is 736px or less we force the image size to be 50% 312 else if (ftsContainerWidth <= '736' && ftsForceColumns === 'no') { 313 var og_size = 'calc(50% - ' + ftsInstagramMarginfinal + 'px)'; 314 } 315 else { 316 if (ftsInstagramColumns === '6') { 317 var og_size = 'calc(16.66666666666667% - ' + ftsInstagramMarginfinal + 'px)'; 318 } 319 else if (ftsInstagramColumns === '5') { 320 var og_size = 'calc(20% - ' + ftsInstagramMarginfinal + 'px)'; 321 } 322 else if (ftsInstagramColumns === '4') { 323 var og_size = 'calc(25% - ' + ftsInstagramMarginfinal + 'px)'; 324 } 325 else if (ftsInstagramColumns === '3') { 326 var og_size = 'calc(33.33333333333333% - ' + ftsInstagramMarginfinal + 'px)'; 327 } 328 else if (ftsInstagramColumns === '2') { 329 var og_size = 'calc(50% - ' + ftsInstagramMarginfinal + 'px)'; 330 } 331 else if (ftsInstagramColumns === '1') { 332 var og_size = 'calc(100% - ' + ftsInstagramMarginfinal + 'px)'; 333 } 334 } 335 var ftsYoutubeLargeHeight = ftsYoutubeLarge.height(); 336 var ftsYoutubeLargeHeightFinal = 'calc(100% - ' + ftsYoutubeLargeHeight + 'px)'; 337 338 ftsYoutubeThumbsWrap.css({'height': ftsYoutubeLargeHeight + 'px'}); 339 340 ftsYoutubeImageSize.css({'width': og_size}); 341 342 ftsYoutubeThumbsContainer.css({ 343 'padding': ftsInstagramMargin 344 }); 345 var ftsImageHeightYoutube = ftsYoutubeImageSize.width() - '150'; 346 ftsYoutubeImageSize.css({ 347 'width': og_size, 348 'height': ftsImageHeightYoutube, 349 'margin': ftsInstagramMargin 350 }); 351 } 352 353 // If our image square is less than 180px then we hide the play button for the youtube feed 354 if (ftsYoutubeImageSize.width() < 180) { 355 jQuery('.slicker-youtube-placeholder').addClass('fts-youtube-smallerthan-180'); 356 357 jQuery('.fts-yt-large, .fts-youtube-scrollable').css('width', '100% !important'); 358 359 } 360 else { 361 jQuery('.slicker-youtube-placeholder').removeClass('fts-youtube-smallerthan-180'); 362 363 } 364 365 var ftsYoutubeContainer = jQuery('.fts-master-youtube-wrap'); 366 // If our image square is less than 180px then we hide the play button for the youtube feed 367 if (ftsYoutubeContainer.width() < 550) { 368 jQuery('.fts-yt-large, .fts-youtube-scrollable, .youtube-comments-wrap').addClass('fts-youtube-smallerthan-550-stack'); 369 370 } 371 else { 372 jQuery('.fts-yt-large, .fts-youtube-scrollable, .youtube-comments-wrap').removeClass('fts-youtube-smallerthan-550-stack'); 373 374 } 375} 376 377// Check each post for an external link and if so then run our function to get the image, title and 378// description from the website and return it and format it nicely. 379function fts_external_link_meta_content () { 380 381 jQuery('.fts-tweeter-wrap').each(function () { 382 383 var fts_url_wrap = jQuery( this ).find( '.fts-twitter-external-url-wrap' ); 384 385 if ( fts_url_wrap.length > 0 ) { 386 387 // alert( fts_url_wrap ); 388 var fts_security = fts_url_wrap.attr('data-twitter-security'); 389 var fts_time = fts_url_wrap.attr('data-twitter-time'); 390 391 var fts_url = fts_url_wrap.attr('data-twitter-url'); 392 var fts_image_exists = fts_url_wrap.attr('data-image-exists-check'); 393 var fts_no_video_image = fts_url_wrap.attr('data-no-video-image-check'); 394 var fts_popup = fts_url_wrap.attr('data-twitter-popup'); 395 396 console.log('url: ' + fts_url + ' Image exists: ' + fts_image_exists + ' No video image exists: ' + fts_no_video_image); 397 398 jQuery.ajax({ 399 data: { 400 action: "fts_twitter_share_url_check", 401 fts_security: fts_security, 402 fts_time: fts_time, 403 fts_url: fts_url, 404 fts_image_exists: fts_image_exists, 405 fts_no_video_image: fts_no_video_image, 406 fts_popup: fts_popup, 407 }, 408 type: 'POST', 409 url: fts_twitter_ajax.ajax_url, 410 success: function (data) { 411 fts_twitter = data; 412 fts_url_wrap.removeAttr( 'class data-twitter-security data-twitter-time' ); 413 414 console.log("FTS Twitter external link success"); 415 // console.log( data ); 416 417 if( 'missing_info' === data ){ 418 // Add a Error message to the attr data-error on the div. This way if people ask why the extra info is not 419 // showing we can look at the div and see if there is an error message :). 420 jQuery(fts_url_wrap).attr( 'data-error', 'Do n
420ot return any content, image, title or description missing' ).hide(); 421 } 422 else { 423 jQuery(fts_url_wrap).html( data ); 424 } 425 426 // Must be second to last so we can adjust the height of the image to the container if larger than our css min height. 427 ftsRetweetHeight(); 428 429 // Lastly check to see if masonry is a function before we reloadItems and Layout. 430 // We need to do this when the grid is being used because the content takes a moment 431 // to load and sometimes the grid layout can overlap making the feed look like dukey. 432 // fts-slicker-twitter-posts is the class applied when grd=yes so we know masonry is loading. 433 if ( jQuery(".fts-slicker-twitter-posts")[0] ) { 434 jQuery(".fts-slicker-twitter-posts").masonry("reloadItems"); 435 setTimeout(function () { 436 jQuery(".fts-slicker-twitter-posts").masonry("layout"); 437 }, 500); 438 } 439 }, 440 error: function (data, status, error) { 441 console.log(data); 442 console.log("AJAX errors: " + error); 443 }, 444 } 445 ); 446 } 447 }); 448 449 return true; 450} 451 452// Find the height of the external link text wrapper and adjust the background image height 453// so it always matches and the image and fits perfectly all the time. 454function ftsRetweetHeight() { 455 if( jQuery('div').hasClass( 'fts-tweeter-wrap' ) ) { 456 457 var twitter_wrap = jQuery('.fts-tweeter-wrap'); 458 if( '475' < twitter_wrap.width() ) { 459 console.log( 'Wrap width: ' + twitter_wrap.width() ); 460 jQuery( '.fts-twitter-div' ).addClass( 'fts-twitter-wrap-below-width-450' ); 461 jQuery( 'span.fts-twitter-external-backg-image' ).css({ 'background-size' : 'cover' } ); 462 463 464 } 465 else { 466 jQuery( '.fts-twitter-div' ).removeClass( 'fts-twitter-wrap-below-width-450' ); 467 jQuery( 'span.fts-twitter-external-backg-image' ).css({ 'background-size' : '0' } ); 468 } 469 470 jQuery('.fts-twitter-quoted-text').each(function () { 471 var retweet_height = jQuery(this).height() + 20; 472 jQuery(this).parent().find('.fts-twitter-external-backg-image').css({'height': retweet_height + 'px'}); 473 //alert( jQuery(this).find( '.fts-twitter-quoted-text' ).height() ); 474 }); 475 } 476} 477// Return our ftsRetweetHeight function after page has loaded to speed things up. Plus this way we can recall it in the loadmore areas of each feed instead of duplicating all the js. 478jQuery(document).ready(ftsRetweetHeight); 479jQuery(window).on('resize', ftsRetweetHeight);
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.