PluginProbe ʕ •ᴥ•ʔ
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress / 4.12.0
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress v4.12.0
4.12.0 4.10.0 4.9.0 4.8.1 trunk 1.0 1.1 1.12.1 1.2.3 1.2.4 1.2.5 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.5 1.5.1 1.5.2 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.4.1 1.6.5 1.6.5.1 1.6.6 1.6.6.1 1.6.6.2 1.6.6.3 1.6.7 1.6.7.1 1.6.8 1.6.8.1 1.6.8.2 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 1.8.2 1.8.2.1 1.8.2.2 1.8.2.3 1.9.0 1.9.1 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.8.1 1.9.9 1.9.9.1 1.9.9.2 1.9.9.3 2.0 2.0.1 2.1 2.1.1 2.1.2 2.1.3 2.10 2.11 2.11.1 2.12 2.12.1 2.12.2 2.12.3 2.12.4 2.13 2.14 2.14.1 2.15 2.15.1 2.16 2.16.1 2.17 2.17.1 2.18 2.18.1 2.18.2 2.18.3 2.19 2.19.1 2.19.2 2.19.3 2.2 2.2.1 2.3 2.3.1 2.3.10 2.3.2 2.3.3 2.3.4 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.1.1 2.4.1.2 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5 2.5.1 2.5.2 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.7 2.7.1 2.7.2 2.8 2.9 2.9.1 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.1 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.7.5 4.7.6 4.7.7
custom-facebook-feed / admin / assets / js / support.js
custom-facebook-feed / admin / assets / js Last commit date
about.js 2 weeks ago admin-notifications.js 2 weeks ago builders-preview-handler.js 2 weeks ago callout.js 2 weeks ago cff-admin-scripts.js 2 weeks ago divi-handler.min.js 2 weeks ago extensions.js 2 weeks ago oembeds.js 2 weeks ago settings.js 2 weeks ago smash-usage-session.js 2 weeks ago support.js 2 weeks ago vue.min.js 2 weeks ago
support.js
219 lines
1 var support_data = {
2 genericText: cff_support.genericText,
3 articles: cff_support.articles,
4 system_info: cff_support.system_info,
5 system_info_n: cff_support.system_info_n,
6 exportFeed: 'none',
7 feeds: cff_support.feeds,
8 supportUrl: cff_support.supportUrl,
9 socialWallActivated: cff_support.socialWallActivated,
10 socialWallLinks: cff_support.socialWallLinks,
11 siteSearchUrl: cff_support.siteSearchUrl,
12 siteSearchUrlWithArgs: null,
13 searchKeywords: null,
14 buttons: cff_support.buttons,
15 links: cff_support.links,
16 supportPageUrl: cff_support.supportPageUrl,
17 systemInfoBtnStatus: 'collapsed',
18 copyBtnStatus: null,
19 ajax_handler: cff_support.ajax_handler,
20 nonce: cff_support.nonce,
21 icons: cff_support.icons,
22 images: cff_support.images,
23 svgIcons : cff_support.svgIcons,
24 notificationElement : {
25 type : 'success', // success, error, warning, message
26 text : '',
27 shown : null
28 },
29 viewsActive : {
30 tempLoginAboutPopup : false
31 },
32 //Tenmp User Account
33 tempUser : cff_support.tempUser,
34 createStatus : null,
35 deleteStatus : null,
36 isSetupPage : false
37 }
38
39 var cffsupport = new Vue({
40 el: "#cff-support",
41 http: {
42 emulateJSON: true,
43 emulateHTTP: true
44 },
45 data: support_data,
46 methods: {
47 copySystemInfo: function() {
48 let self = this;
49 const el = document.createElement('textarea');
50 el.className = 'cff-fb-cp-clpboard';
51 el.value = self.system_info_n;
52 document.body.appendChild(el);
53 el.select();
54 document.execCommand('copy');
55 document.body.removeChild(el);
56 this.notificationElement = {
57 type : 'success',
58 text : this.genericText.copiedToClipboard,
59 shown : "shown"
60 };
61
62 setTimeout(function() {
63 this.notificationElement.shown = "hidden";
64 }.bind(self), 3000);
65 },
66 expandSystemInfo: function() {
67 this.systemInfoBtnStatus = ( this.systemInfoBtnStatus == 'collapsed' ) ? 'expanded' : 'collapsed';
68 },
69 expandBtnText: function() {
70 if ( this.systemInfoBtnStatus == 'collapsed' ) {
71 return this.buttons.expand;
72 } else if ( this.systemInfoBtnStatus == 'expanded' ) {
73 return this.buttons.collapse;
74 }
75 },
76 exportFeedSettings: function() {
77 // return if no feed is selected
78 if ( this.exportFeed === 'none' ) {
79 return;
80 }
81
82 let url = this.ajax_handler + '?action=cff_export_settings_json&feed_id=' + + this.exportFeed + '&nonce=' + this.nonce;
83 window.location = url;
84 },
85 searchDoc: function() {
86 let self = this;
87 let searchInput = document.getElementById('cff-search-doc-input');
88 searchInput.addEventListener('keyup', function ( event ) {
89 let url = new URL( self.siteSearchUrl );
90 let search_params = url.searchParams;
91 if ( self.searchKeywords ) {
92 search_params.set('search', self.searchKeywords);
93 }
94 search_params.set('plugin', 'facebook');
95 url.search = search_params.toString();
96 self.siteSearchUrlWithArgs = url.toString();
97
98 if ( event.key === 'Enter' ) {
99 window.open( self.siteSearchUrlWithArgs, '_blank');
100 }
101 })
102 },
103 searchDocStrings: function() {
104 let self = this;
105 let url = new URL( this.siteSearchUrl );
106 let search_params = url.searchParams;
107 setTimeout(function() {
108 search_params.set('search', self.searchKeywords);
109 search_params.set('plugin', 'facebook');
110 url.search = search_params.toString();
111 self.siteSearchUrlWithArgs = url.toString();
112 }, 10);
113 },
114 goToSearchDocumentation: function() {
115 if ( this.searchKeywords !== null && this.siteSearchUrlWithArgs !== null ) {
116 window.open( this.siteSearchUrlWithArgs, '_blank');
117 }
118 },
119 /**
120 * Copy text to clipboard
121 *
122 * @since 4.0
123 */
124 copyToClipBoard : function(value){
125 var self = this;
126 const el = document.createElement('textarea');
127 el.className = 'cff-fb-cp-clpboard';
128 el.value = value;
129 document.body.appendChild(el);
130 el.select();
131 document.execCommand('copy');
132 document.body.removeChild(el);
133 self.notificationElement = {
134 type : 'success',
135 text : this.genericText.copiedToClipboard,
136 shown : "shown"
137 };
138 setTimeout(function(){
139 self.notificationElement.shown = "hidden";
140 }, 3000);
141 },
142 /**
143 * Activate View
144 *
145 * @since 4.0
146 */
147 activateView : function(viewName){
148 var self = this;
149 self.viewsActive[viewName] = (self.viewsActive[viewName] == false ) ? true : false;
150 },
151 /**
152 * Create New Temp User
153 *
154 * @since 4.0
155 */
156 createTempUser: function() {
157 const self = this;
158 self.createStatus = 'loading';
159 let data = new FormData();
160 data.append( 'action', 'cff_create_temp_user' );
161 data.append( 'nonce', cff_support.nonce );
162 fetch(cff_support.ajax_handler, {
163 method: "POST",
164 credentials: 'same-origin',
165 body: data
166 })
167 .then(response => response.json())
168 .then(data => {
169 self.createStatus = null;
170 if( data.success ){
171 self.tempUser = data.user;
172 }
173 self.notificationElement = {
174 type : data.success === true ? 'success' : 'error',
175 text : data.message,
176 shown : "shown"
177 };
178 setTimeout(function(){
179 self.notificationElement.shown = "hidden";
180 }, 5000);
181 });
182
183 },
184
185 /**
186 * Delete Temp User
187 *
188 * @since 4.0
189 */
190 deleteTempUser: function() {
191 const self = this;
192 self.deleteStatus = 'loading';
193 let data = new FormData();
194 data.append( 'action', 'cff_delete_temp_user' );
195 data.append( 'nonce', cff_support.nonce );
196 data.append( 'userId', self.tempUser.id );
197 fetch(cff_support.ajax_handler, {
198 method: "POST",
199 credentials: 'same-origin',
200 body: data
201 })
202 .then(response => response.json())
203 .then(data => {
204 self.deleteStatus = null;
205 if( data.success ){
206 self.tempUser = null;
207 }
208 self.notificationElement = {
209 type : data.success === true ? 'success' : 'error',
210 text : data.message,
211 shown : "shown"
212 };
213 setTimeout(function(){
214 self.notificationElement.shown = "hidden";
215 }, 5000);
216 });
217 }
218 },
219 })