PluginProbe
Tagembed: Social Media Feeds and Customer Reviews Widget / 4.8
Tagembed: Social Media Feeds and Customer Reviews Widget v4.8
7.8 7.5 7.6 7.7 7.4 trunk 3.10 3.9 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 All 43 releases
tagembed-widget / assets / js / customize / tagembed.customize.script.js

tagembed.customize.script.js in Tagembed: Social Media Feeds and Customer Reviews Widget 4.8, at assets/js/customize/tagembed.customize.script.js

435 lines 26.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*--Start-- Manage Custom Font Family Dropdown*/
2 const mainEl = document.querySelector('.__tagembed__ff_dropdwon .__tagembed__dd_first');
3 const liEls = document.querySelectorAll('.__tagembed__ff_dropdwon > ul > li.__tagembed__dd_inputoption');
4 mainEl.addEventListener("click", () => {
5 for (let liEl of liEls)
6 liEl.style.display = 'list-item';
7 });
8 for (let liEl of liEls) {
9 liEl.addEventListener("click", () => {
10 mainEl.innerHTML = liEl.innerHTML;
11 document.getElementById('__tagembed__font_family').value = liEl.getAttribute('data-value');
12 for (let liEle of liEls)
13 liEle.style.display = 'none';
14 });
15 }
16 /*--End-- Manage Custom Font Family Dropdown*/
17 /*--Start--Get Customization Option*/
18 window.addEventListener ? window.addEventListener("load", __tagembed__getCustomizationOption, false) : window.attachEvent && window.attachEvent("onload", __tagembed__getCustomizationOption);
19 function __tagembed__getCustomizationOption() {
20 /*Manage Customizaton Section Hide Show*/
21 document.querySelector("#__tagembed__customization_section").style.display = "none";
22 let widgetId = document.querySelector("#__tagembed__widgets").selectedOptions[0];
23 widgetId = widgetId.value.split('#')[0];
24 let __tagembed__toast = new TagembedToast;
25 let formData = new FormData();
26 formData.append('action', 'data');
27 formData.append('widgetId', widgetId);
28 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones);
29 formData.append('__tagembed__ajax_action', '__tagembed__get_customization_option');
30 __tagembed__open_loader();
31 fetch(__tagembed__ajax_url, {
32 method: 'POST',
33 headers: {
34 'x-requested-with': 'XMLHttpRequest',
35 },
36 body: formData,
37 }).then(response => {
38 return response.json()
39 }).then(response => {
40 __tagembed__close_loader();
41 if (response.status == true) {
42 __tagembed__manageCustomizationOptions(response.data);
43 } else {
44 __tagembed__toast.danger({message: "Something went wrong. Please try after sometime", position: '__tagembed__is-top-right'});
45 }
46 }).catch((error) => {
47 console.log(error);
48 __tagembed__close_loader();
49 __tagembed__toast.danger({message: "Something went wrong. Please try after sometime", position: '__tagembed__is-top-right'});
50 });
51 }
52 /*--Start-- Manage Customization Options*/
53 function __tagembed__manageCustomizationOptions(__tagembed__customizationsOptions) {
54 document.querySelector("#__tagembed__personalization_id").value = __tagembed__customizationsOptions.Personalization.id;
55 document.querySelector("#__tagembed__themeRule_id").value = __tagembed__customizationsOptions.ThemeRule.id;
56
57 /*--Start-- Manage Layout Setting*/
58 document.querySelector("#__tagembed__featured_popup").checked = false;
59 document.querySelector("#__tagembed__direct_to_source").checked = false;
60 document.querySelector("#__tagembed__none").checked = false;
61 if (__tagembed__customizationsOptions.Personalization.postFeatured == 1)
62 document.querySelector("#__tagembed__featured_popup").checked = true;
63 if (__tagembed__customizationsOptions.Personalization.mobilePopup == 1)
64 document.querySelector("#__tagembed__direct_to_source").checked = true;
65 if (__tagembed__customizationsOptions.Personalization.postFeatured == 0 && __tagembed__customizationsOptions.Personalization.mobilePopup == 0)
66 document.querySelector("#__tagembed__none").checked = true;
67 document.querySelector("#__tagembed__total_noptd").value = __tagembed__customizationsOptions.ThemeRule.numberOfPosts;
68 document.querySelector("#__tagembed__hide_top_ck").checked = false;
69 if (__tagembed__customizationsOptions.Personalization.postText == 1)
70 document.querySelector("#__tagembed__hide_top_ck").checked = true;
71 document.querySelector("#__tagembed__ps").value = __tagembed__customizationsOptions.Personalization.padding;
72 document.querySelector("#__tagembed__post_spacing_range_value_section").innerHTML = __tagembed__customizationsOptions.Personalization.padding;
73 document.querySelector("#__tagembed__post_mw").value = __tagembed__customizationsOptions.Personalization.minimumPostWidth;
74 document.querySelector("#__tagembed__post_width_range_value_section").innerHTML = __tagembed__customizationsOptions.Personalization.minimumPostWidth;
75 document.querySelector("#__tagembed__columnCount").value = __tagembed__customizationsOptions.Personalization.columnCount;
76 document.querySelector("#__tagembed__columnCountMobile").value = __tagembed__customizationsOptions.Personalization.columnCountMobile;
77 /*--End-- Manage Layout Setting*/
78
79 /*--Start-- Manage Card Setting*/
80 document.querySelector("#__tagembed__fontColor").value = __tagembed__customizationsOptions.ThemeRule.fontColor;
81 document.querySelector("#__tagembed__post_font_color_value_section").innerHTML = __tagembed__customizationsOptions.ThemeRule.fontColor;
82 document.querySelector("#__tagembed__authorFontColor").value = __tagembed__customizationsOptions.ThemeRule.authorColor;
83 document.querySelector("#__tagembed__author_font_color_value_section").innerHTML = __tagembed__customizationsOptions.ThemeRule.authorColor;
84 document.querySelector("#__tagembed__cardColor").value = __tagembed__customizationsOptions.ThemeRule.cardColor;
85 document.querySelector("#__tagembed__card_color_value_section").innerHTML = __tagembed__customizationsOptions.ThemeRule.cardColor;
86 document.querySelector("#__tagembed__post_font_size").innerHTML = __tagembed__customizationsOptions.ThemeRule.fontSize;
87 document.querySelector("#__tagembed__post_font_size_section").innerHTML = __tagembed__customizationsOptions.ThemeRule.fontSize;
88 document.querySelector("#__tagembed__show_so_ck").checked = false;
89 if (__tagembed__customizationsOptions.ThemeRule.shareOption == 1)
90 document.querySelector("#__tagembed__show_so_ck").checked = true;
91 document.querySelector("#__tagembed__hide_c_ck").checked = false;
92 if (__tagembed__customizationsOptions.ThemeRule.hideContent == 1)
93 document.querySelector("#__tagembed__hide_c_ck").checked = true;
94 document.querySelector("#__tagembed__show_ad_ck").checked = false;
95 if (__tagembed__customizationsOptions.Personalization.postAuthor == 1)
96 document.querySelector("#__tagembed__show_ad_ck").checked = true;
97 document.querySelector("#__tagembed__show_date_ck").checked = false;
98 if (__tagembed__customizationsOptions.Personalization.postTime == 1)
99 document.querySelector("#__tagembed__show_date_ck").checked = true;
100 document.querySelector("#__tagembed__font_family").value = __tagembed__customizationsOptions.ThemeRule.font;
101 document.querySelector(".__tagembed__dd_first").innerHTML = `<img src="${__tagembed__plugin_url_for_js}assets/images/fonts/${__tagembed__customizationsOptions.ThemeRule.font}.png" alt="">`;
102 document.querySelector("#__tagembed__linetrim").value = (__tagembed__customizationsOptions.ThemeRule.lineTrim == null) ? 0 : __tagembed__customizationsOptions.ThemeRule.lineTrim
103 document.querySelector("#__tagembed__aspectimageratio").value = __tagembed__customizationsOptions.ThemeRule.aspectImageRatio;
104 document.querySelector("#__tagembed__left_alignment").checked = false;
105 document.querySelector("#__tagembed__center_alignment").checked = false;
106 document.querySelector("#__tagembed__right_alignment").checked = false;
107 if (__tagembed__customizationsOptions.ThemeRule.textAlignment == 'left')
108 document.querySelector("#__tagembed__left_alignment").checked = true;
109 if (__tagembed__customizationsOptions.ThemeRule.textAlignment == 'right')
110 document.querySelector("#__tagembed__right_alignment").checked = true;
111 if (__tagembed__customizationsOptions.ThemeRule.textAlignment == 'center' || __tagembed__customizationsOptions.ThemeRule.textAlignment == 'NULL')
112 document.querySelector("#__tagembed__center_alignment").checked = true;
113 document.querySelector("#__tagembed__square_curve").checked = false;
114 document.querySelector("#__tagembed__rounded_corner").checked = false;
115 document.querySelector("#__tagembed__circular_corner").checked = false;
116 if (__tagembed__customizationsOptions.ThemeRule.cardCurve == 0)
117 document.querySelector("#__tagembed__square_curve").checked = true;
118 if (__tagembed__customizationsOptions.ThemeRule.cardCurve == 8)
119 document.querySelector("#__tagembed__rounded_corner").checked = true;
120 if (__tagembed__customizationsOptions.ThemeRule.cardCurve == 24)
121 document.querySelector("#__tagembed__circular_corner").checked = true;
122 document.querySelector("#__tagembed__light_theme").checked = false;
123 document.querySelector("#__tagembed__dark_theme").checked = false;
124 if (__tagembed__customizationsOptions.ThemeRule.colorType == 0)
125 document.querySelector("#__tagembed__light_theme").checked = true;
126 if (__tagembed__customizationsOptions.ThemeRule.colorType == 1)
127 document.querySelector("#__tagembed__dark_theme").checked = true;
128 /*--End-- Manage Card Setting*/
129
130 /*--Start-- Manage Custom Css Setting*/
131 document.querySelector("#__tagembed__custom_css").value = __tagembed__customizationsOptions.Personalization.css;
132 /*--End-- Manage Custom Css Setting*/
133
134 /*--Start-- Manage Footer Setting*/
135 document.querySelector("#__tagembed__show_more").checked = false;
136 document.querySelector("#__tagembed__auto_load").checked = false;
137 document.querySelector("#__tagembed__showmore_autoload_none").checked = false;
138 document.querySelector("#__tagembed__show_more_txt").value = __tagembed__customizationsOptions.Personalization.custom_lan_data.showMore;
139 if (__tagembed__customizationsOptions.Personalization.loadMoreStatus == 1)
140 document.querySelector("#__tagembed__show_more").checked = true;
141 if (__tagembed__customizationsOptions.Personalization.autoScrollStatus == 1)
142 document.querySelector("#__tagembed__auto_load").checked = true;
143 if (__tagembed__customizationsOptions.Personalization.loadMoreStatus == 0 && __tagembed__customizationsOptions.Personalization.autoScrollStatus == 0)
144 document.querySelector("#__tagembed__showmore_autoload_none").checked = true;
145 if (__tagembed__customizationsOptions.Personalization.loadMoreStatus == 1) {
146 document.querySelector("#__tagembed__show_more_text_sectction").style.display = "block";
147 } else {
148 document.querySelector("#__tagembed__show_more_text_sectction").style.display = "none";
149 }
150 /*--End-- Manage Footer Setting*/
151
152 /*Manage Customizaton Section Hide Show*/
153 document.querySelector("#__tagembed__customization_section").style.display = "flex";
154 }
155 /*--End-- Manage Customization Options*/
156 /*--End--Get Customization Option*/
157
158 /*--Start--Update Customization Option*/
159 function __tagembed__updateCustomizationOption(__tagembed__optionType) {
160 let __tagembed__toast = new TagembedToast;
161 let formData = new FormData();
162 formData.append('personalizationId', document.querySelector("#__tagembed__personalization_id").value);
163 formData.append('themeRuleId', document.querySelector("#__tagembed__themeRule_id").value);
164 switch (__tagembed__optionType) {
165 case 'footer':
166 let __tagembed__show_more_txt = document.querySelector("#__tagembed__show_more_txt").value;
167 let __tagembed__autoScrollStatusValue = 0;
168 let __tagembed__showMoreValue = 0;
169 if (document.querySelector("#__tagembed__show_more").checked) {
170 __tagembed__showMoreValue = 1;
171 __tagembed__autoScrollStatusValue = 0;
172 }
173 if (document.querySelector("#__tagembed__auto_load").checked) {
174 __tagembed__showMoreValue = 0;
175 __tagembed__autoScrollStatusValue = 1;
176 }
177 if (document.querySelector("#__tagembed__showmore_autoload_none").checked) {
178 __tagembed__showMoreValue = 0;
179 __tagembed__autoScrollStatusValue = 0;
180 }
181 /*Manage Form Data*/
182 formData.append('loadMoreStatus', __tagembed__showMoreValue);
183 formData.append('autoScrollStatus', __tagembed__autoScrollStatusValue);
184 formData.append('showMoreTxt', __tagembed__show_more_txt);
185 break;
186 case 'layout':
187 let __tagembed__total_numberOFPostToDisplay = document.querySelector("#__tagembed__total_noptd").value;
188 let __tagembed__postSpacing = document.querySelector("#__tagembed__ps").value;
189 let __tagembed__maximumPostWidth = document.querySelector("#__tagembed__post_mw").value;
190 let __tagembed__columnCountDesktop = document.querySelector("#__tagembed__columnCount").value;
191 let __tagembed__columnCountMobile = document.querySelector("#__tagembed__columnCountMobile").value;
192 let __tagembed__hideTextOnlyPostCheckBoxValue = 0;
193 let __tagembed__hideTextOnlyPost = document.querySelector("#__tagembed__hide_top_ck");
194 if (__tagembed__hideTextOnlyPost.checked)
195 __tagembed__hideTextOnlyPostCheckBoxValue = 1;
196 let __tagembed__featurePopupCheckBoxValue = 0;
197 if (document.querySelector("#__tagembed__featured_popup").checked)
198 __tagembed__featurePopupCheckBoxValue = 1;
199 let __tagembed__directToSourceCheckBoxValue = 0;
200 if (document.querySelector("#__tagembed__direct_to_source").checked)
201 __tagembed__directToSourceCheckBoxValue = 1;
202 if (document.querySelector("#__tagembed__none").checked) {
203 __tagembed__directToSourceCheckBoxValue = 0;
204 __tagembed__featurePopupCheckBoxValue = 0;
205 }
206 /*Manage Form Data*/
207 formData.append('numberOfPosts', __tagembed__total_numberOFPostToDisplay);
208 formData.append('padding', __tagembed__postSpacing);
209 formData.append('minimumPostWidth', __tagembed__maximumPostWidth);
210 formData.append('columnCount', __tagembed__columnCountDesktop);
211 formData.append('columnCountMobile', __tagembed__columnCountMobile);
212 formData.append('postText', __tagembed__hideTextOnlyPostCheckBoxValue);
213 formData.append('mobilePopup', __tagembed__directToSourceCheckBoxValue);
214 formData.append('postFeatured', __tagembed__featurePopupCheckBoxValue);
215 break;
216 case 'card':
217 let __tagembed__fontColor = document.querySelector("#__tagembed__fontColor").value;
218 let __tagembed__authorFontColor = document.querySelector("#__tagembed__authorFontColor").value;
219 let __tagembed__cardColor = document.querySelector("#__tagembed__cardColor").value;
220 let __tagembed__fontSize = document.querySelector("#__tagembed__post_font_size").value;
221 let __tagembed__font_family = document.querySelector("#__tagembed__font_family").value;
222 let __tagembed__showShareOptionCheckBoxValue = 0;
223 let __tagembed__show_so_ck = document.querySelector("#__tagembed__show_so_ck");
224 if (__tagembed__show_so_ck.checked)
225 __tagembed__showShareOptionCheckBoxValue = 1;
226 let __tagembed__hideContentCheckBoxValue = 0;
227 let __tagembed__hide_c_ck = document.querySelector("#__tagembed__hide_c_ck");
228 if (__tagembed__hide_c_ck.checked)
229 __tagembed__hideContentCheckBoxValue = 1;
230 let __tagembed__showAuthorDetailsCheckBoxValue = 0;
231 let __tagembed__show_ad_ck = document.querySelector("#__tagembed__show_ad_ck");
232 if (__tagembed__show_ad_ck.checked)
233 __tagembed__showAuthorDetailsCheckBoxValue = 1;
234 let __tagembed__showDataCheckBoxValue = 0;
235 let __tagembed__show_date_ck = document.querySelector("#__tagembed__show_date_ck");
236 if (__tagembed__show_date_ck.checked)
237 __tagembed__showDataCheckBoxValue = 1;
238 /*New Card Style Data*/
239
240 let __tagembed__linetrim = document.querySelector("#__tagembed__linetrim").value;
241 let __tagembed__aspectImageRatio = document.querySelector("#__tagembed__aspectimageratio").value;
242 if (document.querySelector("#__tagembed__left_alignment").checked)
243 __tagembed__textAlignment = 'left';
244 if (document.querySelector("#__tagembed__center_alignment").checked)
245 __tagembed__textAlignment = 'center';
246 if (document.querySelector("#__tagembed__right_alignment").checked)
247 __tagembed__textAlignment = 'right';
248 if (document.querySelector("#__tagembed__square_curve").checked)
249 __tagembed__cardCurve = 0;
250 if (document.querySelector("#__tagembed__rounded_corner").checked)
251 __tagembed__cardCurve = 8;
252 if (document.querySelector("#__tagembed__circular_corner").checked)
253 __tagembed__cardCurve = 24;
254 if (document.querySelector("#__tagembed__light_theme").checked)
255 __tagembed__themeOption = 0;
256 if (document.querySelector("#__tagembed__dark_theme").checked)
257 __tagembed__themeOption = 1;
258 /*Manage Form Data*/
259 formData.append('fontColor', __tagembed__fontColor);
260 formData.append('authorColor', __tagembed__authorFontColor);
261 formData.append('cardColor', __tagembed__cardColor);
262 formData.append('fontSize', __tagembed__fontSize);
263 formData.append('font', __tagembed__font_family);
264 formData.append('shareOption', __tagembed__showShareOptionCheckBoxValue);
265 formData.append('hideContent', __tagembed__hideContentCheckBoxValue);
266 formData.append('postAuthor', __tagembed__showAuthorDetailsCheckBoxValue);
267 formData.append('postTime', __tagembed__showDataCheckBoxValue);
268 formData.append('lineTrim', __tagembed__linetrim);
269 formData.append('aspectImageRatio', __tagembed__aspectImageRatio);
270 formData.append('textAlignment', __tagembed__textAlignment);
271 formData.append('cardCurve', __tagembed__cardCurve);
272 formData.append('colorType', __tagembed__themeOption);
273 break;
274 case 'other':
275 let __tagembed__customCss = document.querySelector("#__tagembed__custom_css").value;
276 /*Manage Form Data*/
277 formData.append('css', __tagembed__customCss);
278 break;
279 default:
280 return __tagembed__toast.danger({message: "Something went wrong. Please try after sometime", position: '__tagembed__is-top-right'});
281 break;
282 }
283 /*Get And Manage Widget Id*/
284 let widgetId = document.querySelector("#__tagembed__widgets").selectedOptions[0];
285 widgetId = widgetId.value.split('#')[0];
286 formData.append('action', 'data');
287 formData.append('widgetId', widgetId);
288 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones);
289 formData.append('__tagembed__ajax_action', '__tagembed__update_' + __tagembed__optionType + '_customization_option');
290 __tagembed__open_loader();
291 fetch(__tagembed__ajax_url, {
292 method: 'POST',
293 headers: {
294 'x-requested-with': 'XMLHttpRequest',
295 },
296 body: formData,
297 }).then(response => {
298 return response.json()
299 }).then(response => {
300 __tagembed__close_loader();
301 if (response.status == true) {
302 if (response.data.hasOwnProperty("message"))
303 __tagembed__toast.success({message: response.data.message, position: '__tagembed__is-top-right'});
304 } else {
305 if (response.hasOwnProperty("message")) {
306 __tagembed__toast.danger({message: response.message, position: '__tagembed__is-top-right'});
307 } else {
308 __tagembed__toast.danger({message: "Something went wrong. Please try after sometime", position: '__tagembed__is-top-right'});
309 }
310 }
311 }).catch((error) => {
312 console.log(error);
313 __tagembed__toast.danger({message: "Something went wrong. Please try after sometime", position: '__tagembed__is-top-right'});
314 });
315 }
316 /*--End--Update Customization Option*/
317
318 /*--Start--Manage Customize Menue Hide Show*/
319 function __tagembed__manageCustomizeMenueHideShow(__tagembed__customize_menue) {
320 /*Section*/
321 let __tagembed__layoutSettings = document.querySelector("#__tagembed__layout_settings");
322 let __tagembed__cardSettings = document.querySelector("#__tagembed__card_settings");
323 let __tagembed__otherSettings = document.querySelector("#__tagembed__other_settings");
324 let __tagembed__footer_settings = document.querySelector("#__tagembed__footer_settings");
325 /*Menue*/
326 let __tagembed__layoutSettingsMenue = document.querySelector("#__tagembed__layout_settings_menue");
327 let __tagembed__cardSettingsMenue = document.querySelector("#__tagembed__card_settings_menue");
328 let __tagembed__otherSettingsMenue = document.querySelector("#__tagembed__other_settings_menue");
329 let __tagembed__footer_settings_menue = document.querySelector("#__tagembed__footer_settings_menue");
330 switch (__tagembed__customize_menue) {
331 case 'ls':
332 __tagembed__cardSettingsMenue.classList.remove("__tagembed__active");
333 __tagembed__cardSettings.style.display = "none";
334
335 __tagembed__otherSettingsMenue.classList.remove("__tagembed__active");
336 __tagembed__otherSettings.style.display = "none";
337
338 __tagembed__footer_settings_menue.classList.remove("__tagembed__active");
339 __tagembed__footer_settings.style.display = "none";
340
341 __tagembed__layoutSettingsMenue.classList.add("__tagembed__active");
342 __tagembed__layoutSettings.style.display = "block";
343 break;
344 case 'cs':
345 __tagembed__layoutSettingsMenue.classList.remove("__tagembed__active");
346 __tagembed__layoutSettings.style.display = "none";
347
348 __tagembed__otherSettingsMenue.classList.remove("__tagembed__active");
349 __tagembed__otherSettings.style.display = "none";
350
351 __tagembed__footer_settings_menue.classList.remove("__tagembed__active");
352 __tagembed__footer_settings.style.display = "none";
353
354 __tagembed__cardSettingsMenue.classList.add("__tagembed__active");
355 __tagembed__cardSettings.style.display = "block";
356 break;
357 case 'os':
358 __tagembed__layoutSettingsMenue.classList.remove("__tagembed__active");
359 __tagembed__layoutSettings.style.display = "none";
360
361 __tagembed__cardSettingsMenue.classList.remove("__tagembed__active");
362 __tagembed__cardSettings.style.display = "none";
363
364 __tagembed__footer_settings_menue.classList.remove("__tagembed__active");
365 __tagembed__footer_settings.style.display = "none";
366
367 __tagembed__otherSettingsMenue.classList.add("__tagembed__active");
368 __tagembed__otherSettings.style.display = "block";
369 break;
370 case 'fo':
371 __tagembed__layoutSettingsMenue.classList.remove("__tagembed__active");
372 __tagembed__layoutSettings.style.display = "none";
373
374 __tagembed__cardSettingsMenue.classList.remove("__tagembed__active");
375 __tagembed__cardSettings.style.display = "none";
376
377 __tagembed__otherSettingsMenue.classList.remove("__tagembed__active");
378 __tagembed__otherSettings.style.display = "none";
379
380 __tagembed__footer_settings_menue.classList.add("__tagembed__active");
381 __tagembed__footer_settings.style.display = "block";
382 break;
383 default:
384 let __tagembed__toast = new TagembedToast;
385 __tagembed__toast.danger({message: "Something went wrong. Please try after sometime", position: '__tagembed__is-top-right'});
386 break;
387 }
388 }
389 /*--End--Manage Customize Menue Hide Show*/
390 /*--Start-- Show Range Input Value*/
391 function __tagembed__showRangeInputValue(__tagembed__range_val, __tagembed__range_value_Show_section_id) {
392 let __tagembed__rangeValueShowSection = document.getElementById(__tagembed__range_value_Show_section_id);
393 if (__tagembed__rangeValueShowSection)
394 __tagembed__rangeValueShowSection.innerHTML = __tagembed__range_val;
395 }
396 /*--End-- Show Range Input Value*/
397 /*--Start-- Show Range Input Value*/
398 function __tagembed__showColorInputValue(__tagembed__color_val, __tagembed__color_value_Show_section_id) {
399 let __tagembed__colorValueShowSection = document.getElementById(__tagembed__color_value_Show_section_id);
400 if (__tagembed__colorValueShowSection)
401 __tagembed__colorValueShowSection.innerHTML = __tagembed__color_val;
402 }
403 /*--End-- Show Range Input Value*/
404 /*--Start-- Show Theme Type*/
405 let __tagembed__light_theme_option = document.querySelector("#__tagembed__light_theme");
406 if (__tagembed__light_theme_option) {
407 __tagembed__light_theme_option.addEventListener('click', function (event) {
408 let cardColor = document.getElementById("__tagembed__cardColor").value = '#fafafa';
409 __tagembed__showColorInputValue(cardColor, '__tagembed__card_color_value_section');
410 let fontColor = document.getElementById("__tagembed__fontColor").value = '#000000';
411 __tagembed__showColorInputValue(fontColor, '__tagembed__post_font_color_value_section');
412 let authorColor = document.getElementById("__tagembed__authorFontColor").value = '#000000';
413 __tagembed__showColorInputValue(authorColor, '__tagembed__author_font_color_value_section');
414 });
415 }
416 let __tagembed__dark_theme_option = document.querySelector("#__tagembed__dark_theme");
417 if (__tagembed__dark_theme_option) {
418 __tagembed__dark_theme_option.addEventListener('click', function (event) {
419 let cardColor = document.getElementById("__tagembed__cardColor").value = '#000000';
420 __tagembed__showColorInputValue('#000000', '__tagembed__card_color_value_section');
421 let fontColor = document.getElementById("__tagembed__fontColor").value = '#fafafa';
422 __tagembed__showColorInputValue(fontColor, '__tagembed__post_font_color_value_section');
423 let authorColor = document.getElementById("__tagembed__authorFontColor").value = '#fafafa';
424 __tagembed__showColorInputValue(authorColor, '__tagembed__author_font_color_value_section');
425 });
426 }
427 /*--End-- Show Theme Type*/
428
429 /*--Start-- Mange Show More Text Section Hide Show*/
430 function __tagembed__manageShowMoreTextSectionHideShow(status) {
431 document.querySelector("#__tagembed__show_more_text_sectction").style.display = "none";
432 if (status == "show")
433 document.querySelector("#__tagembed__show_more_text_sectction").style.display = "block";
434 }
435 /*--End-- Mange Show More Text Section Hide Show*/