1'use strict'; 2 3 4var CustomFacebookFeedElementor = window.CustomFacebookFeedElementor || ( function( document, window, $ ) { 5 6 var vars = {}; 7 8 var app = { 9 10 init: function() { 11 app.events(); 12 }, 13 14 events: function() { 15 16 $( window ).on('elementor/frontend/init', function ( $scope ) { 17 18 elementorFrontend.hooks.addAction('frontend/element_ready/cff-widget.default', app.frontendWidgetInit); 19 if( 'undefined' !== typeof elementor ){ 20 elementor.hooks.addAction( 'panel/open_editor/widget/cff-widget', app.widgetPanelOpen ); 21 } 22 23 }); 24 25 }, 26 27 CffInitWidget: function() { 28 if( window?.parent?.window[0]?.cff_init ){ 29 window.parent.window[0].cff_init($(window.parent.window[0]).find('.cff')); 30 if( jQuery('#cff.cff-lb').length && jQuery('#cff-lightbox-wrapper').length == 0) cffLightbox(); 31 } 32 }, 33 34 registerWidgetEvents: function( $scope ) { 35 $scope 36 .on( 'change', '.sb-elementor-cta-feedselector', app.selectFeedInPreview ); 37 38 }, 39 40 frontendWidgetInit : function( $scope ){ 41 app.CffInitWidget(); 42 app.registerWidgetEvents( $scope ); 43 }, 44 45 findFeedSelector: function( event ) { 46 47 vars.$select = event && event.$el ? 48 event.$el.closest( '#elementor-controls' ).find( 'select[data-setting="feed_id"]' ) : 49 window.parent.jQuery( '#elementor-controls select[data-setting="feed_id"]' ); 50 }, 51 52 53 selectFeedInPreview : function( event ){ 54 55 vars.feedId = $( this ).val(); 56 57 app.findFeedSelector(); 58 59 vars.$select.val( vars.feedId ).trigger( 'change' ); 60 61 }, 62 63 64 widgetPanelOpen: function( panel, model ) { 65 panel.$el.find( '.elementor-control.elementor-control-feed_id' ).find( 'select' ).on( 'change', function(){ 66 setTimeout(function(){ 67 app.CffInitWidget(); 68 }, 4000) 69 }); 70 }, 71 72 73 74 }; 75 76 return app; 77 78 79 80}( document, window, jQuery ) ); 81 82 83CustomFacebookFeedElementor.init();
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.