PluginProbe ʕ •ᴥ•ʔ
WP Chat App / 3.6.9
WP Chat App v3.6.9
3.8.1 3.8.2 trunk 2.6 3.4 3.4.1 3.4.2 3.4.4 3.4.5 3.4.6 3.5 3.6 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0
wp-whatsapp / assets / js / whatsapp-button.js
wp-whatsapp / assets / js Last commit date
admin.js 1 year ago cross.js 1 year ago whatsapp-button.js 1 year ago whatsapp-popup.js 1 year ago
whatsapp-button.js
39 lines
1 (function () {
2 njtWhatsApp.ready(function () {
3 const init = function () {
4 document.querySelectorAll(".nta_wa_button").forEach(function (element) {
5 if (element._isWaButton) return
6 const info = JSON.parse(element.getAttribute('data-info'))
7 njtWhatsApp.createButton(element, {
8 ...info,
9 timezone: njt_wa_global.timezone,
10 i18n: njt_wa_global.i18n,
11 urlSettings: njt_wa_global.urlSettings,
12 });
13 });
14 };
15 init();
16
17 if (window.jQuery) {
18 // Support Riode Theme
19 if (typeof(Riode) !== 'undefined' && typeof(jQuery) !== 'undefined') {
20 Riode.$window.on('riode_load', function(){ init() })
21 jQuery(document).ajaxComplete((e, xhs, req) => {
22 try {
23 if (req.data.indexOf('riode_quickview') > -1) { init() }
24 } catch (e) {
25 console.log("error")
26 }
27 })
28 }
29
30 // Support Porto Theme
31 jQuery(document).ajaxComplete((e, xhs, req) => {
32 try {
33 if (req.data.indexOf('action=porto_lazyload_menu') > -1) { init() }
34 } catch (e) {}
35 })
36 }
37 });
38 })();
39