WhatsApp me - Version 4.1.5

Version Description

  • NEW: Add links to WhastApp with #joinchat or #whatsapp in your href. CSS triggers and links work on all pages, even without Join.chat visible.
  • NEW: Analytics event compatible with Google Analytics Dashboard Plugin for WordPress by MonsterInsights custom tracker name
  • Load images when show button for better Page speed.
Download this release

Release Info

Developer creapuntome
Plugin Icon 128x128 WhatsApp me
Version 4.1.5
Comparing to
See all releases

Code changes from version 4.1.4 to 4.1.5

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: whatsapp business, whatsapp, click to chat, button, whatsapp support chat,
5
  Requires at least: 3.0.1
6
  Tested up to: 5.6
7
  Requires PHP: 5.3
8
- Stable tag: 4.1.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -61,7 +61,7 @@ To be able to support all your users, wherever they are. Our plugin is **compati
61
  You choose a color and we customize the entire visual theme of the widget. With Dark Mode display the chat window with dark colors and white text. From settings you can activate it or leave it automatic and detects devices' configuration.
62
 
63
  #### 🍾 CSS Triggers.
64
- Your pages can interact with Join.chat and show the chat window or launch WhatsApp **when user clicks or an item appears on scrolling**. You just need to add a few CSS classes.
65
 
66
  #### ⚡ Fast & Light.
67
  Only load what need when needed. Join.chat is lightweight and follow best coding practices. [See tests report](https://wphive.com/plugins/creame-whatsapp-me/)
@@ -131,6 +131,19 @@ If you need to move up:
131
  .joinchat { --bottom: 60px; }
132
  }`
133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  = What about GDPR? =
135
 
136
  Join.chat don't use cookies.
@@ -201,6 +214,11 @@ There is a Javascript event that Join.chat triggers automatically before launch
201
 
202
  == Changelog ==
203
 
 
 
 
 
 
204
  = 4.1.4 =
205
  * **NEW:** PHP 8 & WordPress 5.6 tested & updated
206
  * Cleaner placeholder on telephone field
5
  Requires at least: 3.0.1
6
  Tested up to: 5.6
7
  Requires PHP: 5.3
8
+ Stable tag: 4.1.5
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
61
  You choose a color and we customize the entire visual theme of the widget. With Dark Mode display the chat window with dark colors and white text. From settings you can activate it or leave it automatic and detects devices' configuration.
62
 
63
  #### 🍾 CSS Triggers.
64
+ Your pages can interact with Join.chat and show the chat window or launch WhatsApp **when user clicks or an item appears on scrolling**. You just need to add a few CSS classes. [View FAQs](https://wordpress.org/plugins/creame-whatsapp-me/faq/)
65
 
66
  #### ⚡ Fast & Light.
67
  Only load what need when needed. Join.chat is lightweight and follow best coding practices. [See tests report](https://wphive.com/plugins/creame-whatsapp-me/)
131
  .joinchat { --bottom: 60px; }
132
  }`
133
 
134
+ = Shortcodes / Triggers =
135
+
136
+ Join.chat does not provide any shortcodes, but you can easily link to WhatsApp in two ways:
137
+
138
+ 1. Add an anchor link to `#whatsapp` (open WhastApp directly) or `#joinchat` (show chat window).
139
+ e.g.: add in your menu a custom link with the URL `#whatsapp`
140
+ 2. Add a css class to any element, `joinchat_app` (open WhastApp directly) or `joinchat_open` (show chat window).
141
+ e.g.: `<img src="contact.jpg" class="joinchat_open" alt="Contact">`
142
+
143
+ This works with your phone settings and message with dynamic variables, **even on pages without Join.chat visible**.
144
+
145
+ For custom WhatsApp links, you can create the url with our **[WhatsApp link generator](https://join.chat/en/whatsapp-link/) free tool** and copy it to your links.
146
+
147
  = What about GDPR? =
148
 
149
  Join.chat don't use cookies.
214
 
215
  == Changelog ==
216
 
217
+ = 4.1.5 =
218
+ * **NEW:** Add links to WhastApp with `#joinchat` or `#whatsapp` in your href. CSS triggers and links work on all pages, **even without Join.chat visible**.
219
+ * **NEW:** Analytics event compatible with Google Analytics Dashboard Plugin for WordPress by MonsterInsights custom tracker name
220
+ * Load images when show button for better Page speed.
221
+
222
  = 4.1.4 =
223
  * **NEW:** PHP 8 & WordPress 5.6 tested & updated
224
  * Cleaner placeholder on telephone field
admin/class-joinchat-admin.php CHANGED
@@ -719,7 +719,14 @@ class JoinChatAdmin {
719
  'id' => 'triggers',
720
  'title' => __( 'Triggers', 'creame-whatsapp-me' ),
721
  'content' =>
722
- '<p>' . __( 'Your page elements can interact with Join.chat adding some CSS classes in your HTML:', 'creame-whatsapp-me' ) . '</p>' .
 
 
 
 
 
 
 
723
  '<ul>' .
724
  '<li><code>joinchat_open</code> ' . __( 'to show Chat Window (or open WhatsApp if there is no CTA) on click.', 'creame-whatsapp-me' ) . '</li>' .
725
  '<li><code>joinchat_close</code> ' . __( 'to hide Chat Window on click.', 'creame-whatsapp-me' ) . '</li>' .
@@ -730,7 +737,7 @@ class JoinChatAdmin {
730
  '<li><code>joinchat_force_show</code> ' . __( 'to show always.', 'creame-whatsapp-me' ) . '</li>' .
731
  '</ul></li>' .
732
  '</ul>' .
733
- '<p>' . __( 'Example:', 'creame-whatsapp-me' ) . '<code>&lt;a href="#" class="joinchat_open"&gt;' . __( 'Contact us', 'creame-whatsapp-me' ) . '&lt;/a&gt;</code></p>',
734
  ),
735
  array(
736
  'id' => 'support',
719
  'id' => 'triggers',
720
  'title' => __( 'Triggers', 'creame-whatsapp-me' ),
721
  'content' =>
722
+ '<p>' . __( 'You can interact on your page with Join.chat in two ways:', 'creame-whatsapp-me' ) . '</p>' .
723
+ '<p>' . __( 'With anchor links:', 'creame-whatsapp-me' ) . '</p>' .
724
+ '<ul>' .
725
+ '<li><code>#joinchat</code> ' . __( 'to show Chat Window (or open WhatsApp if there is no CTA) on click.', 'creame-whatsapp-me' ) . '</li>' .
726
+ '<li><code>#whatsapp</code> ' . __( 'to open WhatsApp directly on click.', 'creame-whatsapp-me' ) . '</li>' .
727
+ '</ul>' .
728
+ '<p>' . __( 'Example:', 'creame-whatsapp-me' ) . '<code>&lt;a href="#whatsapp"&gt;' . __( 'Contact us', 'creame-whatsapp-me' ) . '&lt;/a&gt;</code></p>' .
729
+ '<p>' . __( 'Adding some CSS classes in your HTML:', 'creame-whatsapp-me' ) . '</p>' .
730
  '<ul>' .
731
  '<li><code>joinchat_open</code> ' . __( 'to show Chat Window (or open WhatsApp if there is no CTA) on click.', 'creame-whatsapp-me' ) . '</li>' .
732
  '<li><code>joinchat_close</code> ' . __( 'to hide Chat Window on click.', 'creame-whatsapp-me' ) . '</li>' .
737
  '<li><code>joinchat_force_show</code> ' . __( 'to show always.', 'creame-whatsapp-me' ) . '</li>' .
738
  '</ul></li>' .
739
  '</ul>' .
740
+ '<p>' . __( 'Example:', 'creame-whatsapp-me' ) . '<code>&lt;img src="contact.jpg" class="joinchat_open" alt="' . __( 'Contact us', 'creame-whatsapp-me' ) . '"&gt;</code></p>',
741
  ),
742
  array(
743
  'id' => 'support',
includes/class-joinchat.php CHANGED
@@ -177,6 +177,7 @@ class JoinChat {
177
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
178
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
179
  $this->loader->add_action( 'wp_footer', $plugin_public, 'footer_html' );
 
180
  $this->loader->add_action( 'elementor/preview/init', $plugin_public, 'elementor_preview_disable' );
181
 
182
  }
177
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
178
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
179
  $this->loader->add_action( 'wp_footer', $plugin_public, 'footer_html' );
180
+ $this->loader->add_action( 'wp_print_footer_scripts', $plugin_public, 'links_script', 20 );
181
  $this->loader->add_action( 'elementor/preview/init', $plugin_public, 'elementor_preview_disable' );
182
 
183
  }
joinchat.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin Name: Join.chat
10
  * Plugin URI: https://join.chat
11
  * Description: Connects a WordPress chat with WhatsApp. The best solution for marketing and support. Stop losing customers and increase your sales.
12
- * Version: 4.1.4
13
  * Author: Creame
14
  * Author URI: https://crea.me
15
  * License: GPL-2.0+
@@ -26,7 +26,7 @@ if ( ! defined( 'WPINC' ) ) {
26
  /**
27
  * Currently plugin version.
28
  */
29
- define( 'JOINCHAT_VERSION', '4.1.4' );
30
 
31
  /**
32
  * The core plugin class that is used to define internationalization,
9
  * Plugin Name: Join.chat
10
  * Plugin URI: https://join.chat
11
  * Description: Connects a WordPress chat with WhatsApp. The best solution for marketing and support. Stop losing customers and increase your sales.
12
+ * Version: 4.1.5
13
  * Author: Creame
14
  * Author URI: https://crea.me
15
  * License: GPL-2.0+
26
  /**
27
  * Currently plugin version.
28
  */
29
+ define( 'JOINCHAT_VERSION', '4.1.5' );
30
 
31
  /**
32
  * The core plugin class that is used to define internationalization,
languages/creame-whatsapp-me.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Join.chat\n"
5
- "POT-Creation-Date: 2020-12-09 11:49+0000\n"
6
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
7
  "Last-Translator: Your Name <you@example.com>\n"
8
  "Language-Team: Creame <hola@crea.me>\n"
@@ -45,10 +45,14 @@ msgstr ""
45
  msgid "Add unlimited numbers with %1$s or multiple contacts with %2$s"
46
  msgstr ""
47
 
48
- #: admin/class-joinchat-admin.php:802
49
  msgid "Add-ons"
50
  msgstr ""
51
 
 
 
 
 
52
  #: admin/class-joinchat-admin.php:288
53
  msgid "Archives"
54
  msgstr ""
@@ -77,7 +81,7 @@ msgstr ""
77
  msgid "Button Text"
78
  msgstr ""
79
 
80
- #: admin/class-joinchat-admin.php:261 admin/class-joinchat-admin.php:938
81
  msgid "Call to Action"
82
  msgstr ""
83
 
@@ -89,7 +93,7 @@ msgstr ""
89
  msgid "Call to Action for Products on Sale"
90
  msgstr ""
91
 
92
- #: admin/class-joinchat-admin.php:945
93
  msgid "Can use vars"
94
  msgstr ""
95
 
@@ -117,7 +121,7 @@ msgstr ""
117
  msgid "Checkout"
118
  msgstr ""
119
 
120
- #: public/class-joinchat-public.php:317
121
  msgid "Close"
122
  msgstr ""
123
 
@@ -133,7 +137,7 @@ msgid ""
133
  "</strong>"
134
  msgstr ""
135
 
136
- #: admin/class-joinchat-admin.php:733
137
  msgid "Contact us"
138
  msgstr ""
139
 
@@ -157,7 +161,7 @@ msgstr ""
157
  msgid "Date Archives"
158
  msgstr ""
159
 
160
- #: admin/class-joinchat-admin.php:955
161
  msgid "Default visibility"
162
  msgstr ""
163
 
@@ -180,12 +184,12 @@ msgid ""
180
  "\"less intrusive\" mode"
181
  msgstr ""
182
 
183
- #: admin/class-joinchat-admin.php:1088
184
  #, php-format
185
  msgid "Do you like %1$s? Please help us with a %2$s rating."
186
  msgstr ""
187
 
188
- #: admin/class-joinchat-admin.php:801
189
  msgid "Documentation"
190
  msgstr ""
191
 
@@ -193,11 +197,11 @@ msgstr ""
193
  msgid "e.g."
194
  msgstr ""
195
 
196
- #: admin/class-joinchat-admin.php:733
197
  msgid "Example:"
198
  msgstr ""
199
 
200
- #: admin/class-joinchat-admin.php:756
201
  #, php-format
202
  msgid "Follow %s on twitter."
203
  msgstr ""
@@ -241,7 +245,7 @@ msgid "Hi *{SITE}*! I need more info about {TITLE} {URL}"
241
  msgstr ""
242
 
243
  #: admin/class-joinchat-admin.php:512 admin/class-joinchat-admin.php:677
244
- #: admin/class-joinchat-admin.php:953
245
  msgid "Hide"
246
  msgstr ""
247
 
@@ -265,11 +269,11 @@ msgid ""
265
  "chat before launching WhatsApp."
266
  msgstr ""
267
 
268
- #: admin/class-joinchat-admin.php:745
269
  msgid "If you like Join.chat 😍"
270
  msgstr ""
271
 
272
- #: admin/class-joinchat-admin.php:740
273
  #, php-format
274
  msgid ""
275
  "If you need help, first review our <a href=\"%1$s\" target=\"_blank\">"
@@ -287,11 +291,11 @@ msgid "Inherit"
287
  msgstr ""
288
 
289
  #. Name of the plugin
290
- #: admin/class-joinchat-admin.php:875
291
  msgid "Join.chat"
292
  msgstr ""
293
 
294
- #: admin/class-joinchat-admin.php:834
295
  msgid "Join.chat Settings"
296
  msgstr ""
297
 
@@ -299,7 +303,7 @@ msgstr ""
299
  msgid "Left"
300
  msgstr ""
301
 
302
- #: admin/class-joinchat-admin.php:252 admin/class-joinchat-admin.php:942
303
  msgid "Message"
304
  msgstr ""
305
 
@@ -327,7 +331,7 @@ msgstr ""
327
  msgid "Only display the button on mobile devices"
328
  msgstr ""
329
 
330
- #: admin/class-joinchat-admin.php:729
331
  msgid "only show if it's an not seen CTA."
332
  msgstr ""
333
 
@@ -357,7 +361,7 @@ msgstr ""
357
  msgid "Page Views"
358
  msgstr ""
359
 
360
- #: admin/class-joinchat-admin.php:748
361
  #, php-format
362
  msgid "Please leave us a %s rating. We'll thank you."
363
  msgstr ""
@@ -370,7 +374,7 @@ msgstr ""
370
  msgid "Post"
371
  msgstr ""
372
 
373
- #: public/class-joinchat-public.php:310
374
  msgid "Powered by"
375
  msgstr ""
376
 
@@ -443,7 +447,7 @@ msgid ""
443
  "displayed."
444
  msgstr ""
445
 
446
- #: admin/class-joinchat-admin.php:779
447
  msgid "Settings"
448
  msgstr ""
449
 
@@ -460,11 +464,11 @@ msgid "Short text shown next to button"
460
  msgstr ""
461
 
462
  #: admin/class-joinchat-admin.php:510 admin/class-joinchat-admin.php:675
463
- #: admin/class-joinchat-admin.php:951
464
  msgid "Show"
465
  msgstr ""
466
 
467
- #: admin/class-joinchat-admin.php:469 admin/class-joinchat-admin.php:1025
468
  msgid "Show Help"
469
  msgstr ""
470
 
@@ -476,16 +480,16 @@ msgstr ""
476
  msgid "Styles and Variables"
477
  msgstr ""
478
 
479
- #: admin/class-joinchat-admin.php:752
480
  #, php-format
481
  msgid "Subscribe to our newsletter and visit our blog at %s."
482
  msgstr ""
483
 
484
- #: admin/class-joinchat-admin.php:737 admin/class-joinchat-admin.php:803
485
  msgid "Support"
486
  msgstr ""
487
 
488
- #: admin/class-joinchat-admin.php:251 admin/class-joinchat-admin.php:934
489
  msgid "Telephone"
490
  msgstr ""
491
 
@@ -511,27 +515,27 @@ msgstr ""
511
  msgid "Time since the page is opened until the button is displayed"
512
  msgstr ""
513
 
514
- #: admin/class-joinchat-admin.php:725
515
  msgid "to hide Chat Window on click."
516
  msgstr ""
517
 
518
- #: admin/class-joinchat-admin.php:947
519
  msgid "to leave it blank use"
520
  msgstr ""
521
 
522
- #: admin/class-joinchat-admin.php:726
523
  msgid "to open WhatsApp directly on click."
524
  msgstr ""
525
 
526
- #: admin/class-joinchat-admin.php:730
527
  msgid "to show always."
528
  msgstr ""
529
 
530
- #: admin/class-joinchat-admin.php:724
531
  msgid "to show Chat Window (or open WhatsApp if there is no CTA) on click."
532
  msgstr ""
533
 
534
- #: admin/class-joinchat-admin.php:727
535
  msgid ""
536
  "To show Chat Window when an HTML element appears on screen when user scrolls:"
537
  msgstr ""
@@ -545,7 +549,7 @@ msgid "Triggers"
545
  msgstr ""
546
 
547
  #: public/class-joinchat-public.php:250 admin/class-joinchat-admin.php:520
548
- #: admin/class-joinchat-admin.php:703 admin/class-joinchat-admin.php:799
549
  msgctxt "url lang slug (only available for spanish \"es\")"
550
  msgid "en"
551
  msgstr ""
@@ -570,6 +574,10 @@ msgstr ""
570
  msgid "WhatsApp Web"
571
  msgstr ""
572
 
 
 
 
 
573
  #: admin/class-joinchat-wooadmin.php:192
574
  msgid "WooCommerce"
575
  msgstr ""
@@ -584,6 +592,10 @@ msgid ""
584
  "pages."
585
  msgstr ""
586
 
 
 
 
 
587
  #: admin/class-joinchat-admin.php:462
588
  msgid ""
589
  "You can introduce yourself, offer help or even make promotions to your users."
@@ -601,16 +613,10 @@ msgid ""
601
  "bold</strong>* ~<del>strikethrough</del>~."
602
  msgstr ""
603
 
604
- #: admin/class-joinchat-admin.php:1024
605
  msgid "You can use vars"
606
  msgstr ""
607
 
608
- #: admin/class-joinchat-admin.php:722
609
- msgid ""
610
- "Your page elements can interact with Join.chat adding some CSS classes in "
611
- "your HTML:"
612
- msgstr ""
613
-
614
  #: admin/class-joinchat-admin.php:565
615
  msgid "💬 Need help?"
616
  msgstr ""
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Join.chat\n"
5
+ "POT-Creation-Date: 2020-12-18 19:31+0000\n"
6
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
7
  "Last-Translator: Your Name <you@example.com>\n"
8
  "Language-Team: Creame <hola@crea.me>\n"
45
  msgid "Add unlimited numbers with %1$s or multiple contacts with %2$s"
46
  msgstr ""
47
 
48
+ #: admin/class-joinchat-admin.php:809
49
  msgid "Add-ons"
50
  msgstr ""
51
 
52
+ #: admin/class-joinchat-admin.php:729
53
+ msgid "Adding some CSS classes in your HTML:"
54
+ msgstr ""
55
+
56
  #: admin/class-joinchat-admin.php:288
57
  msgid "Archives"
58
  msgstr ""
81
  msgid "Button Text"
82
  msgstr ""
83
 
84
+ #: admin/class-joinchat-admin.php:261 admin/class-joinchat-admin.php:945
85
  msgid "Call to Action"
86
  msgstr ""
87
 
93
  msgid "Call to Action for Products on Sale"
94
  msgstr ""
95
 
96
+ #: admin/class-joinchat-admin.php:952
97
  msgid "Can use vars"
98
  msgstr ""
99
 
121
  msgid "Checkout"
122
  msgstr ""
123
 
124
+ #: public/partials/html.php:48
125
  msgid "Close"
126
  msgstr ""
127
 
137
  "</strong>"
138
  msgstr ""
139
 
140
+ #: admin/class-joinchat-admin.php:728 admin/class-joinchat-admin.php:740
141
  msgid "Contact us"
142
  msgstr ""
143
 
161
  msgid "Date Archives"
162
  msgstr ""
163
 
164
+ #: admin/class-joinchat-admin.php:962
165
  msgid "Default visibility"
166
  msgstr ""
167
 
184
  "\"less intrusive\" mode"
185
  msgstr ""
186
 
187
+ #: admin/class-joinchat-admin.php:1095
188
  #, php-format
189
  msgid "Do you like %1$s? Please help us with a %2$s rating."
190
  msgstr ""
191
 
192
+ #: admin/class-joinchat-admin.php:808
193
  msgid "Documentation"
194
  msgstr ""
195
 
197
  msgid "e.g."
198
  msgstr ""
199
 
200
+ #: admin/class-joinchat-admin.php:728 admin/class-joinchat-admin.php:740
201
  msgid "Example:"
202
  msgstr ""
203
 
204
+ #: admin/class-joinchat-admin.php:763
205
  #, php-format
206
  msgid "Follow %s on twitter."
207
  msgstr ""
245
  msgstr ""
246
 
247
  #: admin/class-joinchat-admin.php:512 admin/class-joinchat-admin.php:677
248
+ #: admin/class-joinchat-admin.php:960
249
  msgid "Hide"
250
  msgstr ""
251
 
269
  "chat before launching WhatsApp."
270
  msgstr ""
271
 
272
+ #: admin/class-joinchat-admin.php:752
273
  msgid "If you like Join.chat 😍"
274
  msgstr ""
275
 
276
+ #: admin/class-joinchat-admin.php:747
277
  #, php-format
278
  msgid ""
279
  "If you need help, first review our <a href=\"%1$s\" target=\"_blank\">"
291
  msgstr ""
292
 
293
  #. Name of the plugin
294
+ #: admin/class-joinchat-admin.php:882
295
  msgid "Join.chat"
296
  msgstr ""
297
 
298
+ #: admin/class-joinchat-admin.php:841
299
  msgid "Join.chat Settings"
300
  msgstr ""
301
 
303
  msgid "Left"
304
  msgstr ""
305
 
306
+ #: admin/class-joinchat-admin.php:252 admin/class-joinchat-admin.php:949
307
  msgid "Message"
308
  msgstr ""
309
 
331
  msgid "Only display the button on mobile devices"
332
  msgstr ""
333
 
334
+ #: admin/class-joinchat-admin.php:736
335
  msgid "only show if it's an not seen CTA."
336
  msgstr ""
337
 
361
  msgid "Page Views"
362
  msgstr ""
363
 
364
+ #: admin/class-joinchat-admin.php:755
365
  #, php-format
366
  msgid "Please leave us a %s rating. We'll thank you."
367
  msgstr ""
374
  msgid "Post"
375
  msgstr ""
376
 
377
+ #: public/partials/html.php:41
378
  msgid "Powered by"
379
  msgstr ""
380
 
447
  "displayed."
448
  msgstr ""
449
 
450
+ #: admin/class-joinchat-admin.php:786
451
  msgid "Settings"
452
  msgstr ""
453
 
464
  msgstr ""
465
 
466
  #: admin/class-joinchat-admin.php:510 admin/class-joinchat-admin.php:675
467
+ #: admin/class-joinchat-admin.php:958
468
  msgid "Show"
469
  msgstr ""
470
 
471
+ #: admin/class-joinchat-admin.php:469 admin/class-joinchat-admin.php:1032
472
  msgid "Show Help"
473
  msgstr ""
474
 
480
  msgid "Styles and Variables"
481
  msgstr ""
482
 
483
+ #: admin/class-joinchat-admin.php:759
484
  #, php-format
485
  msgid "Subscribe to our newsletter and visit our blog at %s."
486
  msgstr ""
487
 
488
+ #: admin/class-joinchat-admin.php:744 admin/class-joinchat-admin.php:810
489
  msgid "Support"
490
  msgstr ""
491
 
492
+ #: admin/class-joinchat-admin.php:251 admin/class-joinchat-admin.php:941
493
  msgid "Telephone"
494
  msgstr ""
495
 
515
  msgid "Time since the page is opened until the button is displayed"
516
  msgstr ""
517
 
518
+ #: admin/class-joinchat-admin.php:732
519
  msgid "to hide Chat Window on click."
520
  msgstr ""
521
 
522
+ #: admin/class-joinchat-admin.php:954
523
  msgid "to leave it blank use"
524
  msgstr ""
525
 
526
+ #: admin/class-joinchat-admin.php:726 admin/class-joinchat-admin.php:733
527
  msgid "to open WhatsApp directly on click."
528
  msgstr ""
529
 
530
+ #: admin/class-joinchat-admin.php:737
531
  msgid "to show always."
532
  msgstr ""
533
 
534
+ #: admin/class-joinchat-admin.php:725 admin/class-joinchat-admin.php:731
535
  msgid "to show Chat Window (or open WhatsApp if there is no CTA) on click."
536
  msgstr ""
537
 
538
+ #: admin/class-joinchat-admin.php:734
539
  msgid ""
540
  "To show Chat Window when an HTML element appears on screen when user scrolls:"
541
  msgstr ""
549
  msgstr ""
550
 
551
  #: public/class-joinchat-public.php:250 admin/class-joinchat-admin.php:520
552
+ #: admin/class-joinchat-admin.php:703 admin/class-joinchat-admin.php:806
553
  msgctxt "url lang slug (only available for spanish \"es\")"
554
  msgid "en"
555
  msgstr ""
574
  msgid "WhatsApp Web"
575
  msgstr ""
576
 
577
+ #: admin/class-joinchat-admin.php:723
578
+ msgid "With anchor links:"
579
+ msgstr ""
580
+
581
  #: admin/class-joinchat-wooadmin.php:192
582
  msgid "WooCommerce"
583
  msgstr ""
592
  "pages."
593
  msgstr ""
594
 
595
+ #: admin/class-joinchat-admin.php:722
596
+ msgid "You can interact on your page with Join.chat in two ways:"
597
+ msgstr ""
598
+
599
  #: admin/class-joinchat-admin.php:462
600
  msgid ""
601
  "You can introduce yourself, offer help or even make promotions to your users."
613
  "bold</strong>* ~<del>strikethrough</del>~."
614
  msgstr ""
615
 
616
+ #: admin/class-joinchat-admin.php:1031
617
  msgid "You can use vars"
618
  msgstr ""
619
 
 
 
 
 
 
 
620
  #: admin/class-joinchat-admin.php:565
621
  msgid "💬 Need help?"
622
  msgstr ""
public/class-joinchat-public.php CHANGED
@@ -279,59 +279,33 @@ class JoinChatPublic {
279
  $box_content = apply_filters( 'joinchat_content', $box_content, $this->settings );
280
 
281
  ob_start();
282
- ?>
283
- <div class="joinchat <?php echo apply_filters( 'joinchat_classes', $joinchat_classes ); ?>" data-settings='<?php echo JoinChatUtil::to_json( $data ); ?>'>
284
- <div class="joinchat__button">
285
- <div class="joinchat__button__open"></div>
286
- <?php if ( $image ) : ?>
287
- <div class="joinchat__button__image"><?php echo $image; ?></div>
288
- <?php endif; ?>
289
- <?php if ( $this->settings['message_start'] ) : ?>
290
- <div class="joinchat__button__sendtext"><?php echo $this->settings['message_start']; ?></div>
291
- <?php endif; ?>
292
- <?php if ( $box_content ) : ?>
293
- <svg class="joinchat__button__send" viewbox="0 0 400 400" stroke-linecap="round" stroke-width="33">
294
- <path class="joinchat_svg__plain" d="M168.83 200.504H79.218L33.04 44.284a1 1 0 0 1 1.386-1.188L365.083 199.04a1 1 0 0 1 .003 1.808L34.432 357.903a1 1 0 0 1-1.388-1.187l29.42-99.427"/>
295
- <path class="joinchat_svg__chat" d="M318.087 318.087c-52.982 52.982-132.708 62.922-195.725 29.82l-80.449 10.18 10.358-80.112C18.956 214.905 28.836 134.99 81.913 81.913c65.218-65.217 170.956-65.217 236.174 0 42.661 42.661 57.416 102.661 44.265 157.316"/>
296
- </svg>
297
- <?php endif; ?>
298
- <?php if ( $this->settings['message_badge'] ) : ?>
299
- <div class="joinchat__badge">1</div>
300
- <?php endif; ?>
301
- <?php if ( $this->settings['button_tip'] ) : ?>
302
- <div class="joinchat__tooltip"><div><?php echo $this->settings['button_tip']; ?></div></div>
303
- <?php endif; ?>
304
- </div>
305
- <?php if ( $box_content ) : ?>
306
- <div class="joinchat__box">
307
- <div class="joinchat__header">
308
- <?php if ( '__jc__' === $this->settings['header'] ) : ?>
309
- <a class="joinchat__powered" href="<?php echo $powered_link; ?>" rel="nofollow noopener" target="_blank">
310
- <?php _e( 'Powered by', 'creame-whatsapp-me' ); ?> <svg viewbox="0 0 1424 318"><title>Join.chat</title><path d="M171 7c1.3 0 3.2.6 5.5 1.8 2.3 1.1 3.5 2.3 3.5 3.4v1.2l-.3 3.6-.5 8a947.3 947.3 0 00-2 56v37.2l.2 15.9.2 23.7c.2 12.3.2 22.8.2 31.4 0 22-5.8 42.8-17.4 62.5-11.6 19.7-27.9 35.7-48.7 48S68 318 43.3 318c-14 0-24.6-2.7-32-8.2A27 27 0 010 286.6a27 27 0 017-18.7c4.7-5.2 11-7.8 18.8-7.8 6.9 0 13.1 2 18.7 6 5.4 3.8 9.7 7.9 12.8 12.4l.3.5A96.8 96.8 0 0068 291.9c3.7 4 7.2 5.9 10.3 5.9 4 0 7.1-2 9.6-6s4.5-11.8 6.2-23.3v-.6a363 363 0 002.5-47.5V104.2l.1-.1V76.3c0-1.6-.2-2.6-.6-3V73c-.5-.4-1.4-.8-3-1.2l-.5-.2-11.9-2c-1.9-.3-2.8-2.5-2.8-6.7 0-3.8 1-6 2.8-6.7 27-10.5 56.2-26.6 87.5-48.3a6 6 0 012.8-1zm1205 43c3.9 0 6 .8 6.1 2.5 1.3 9.6 2.1 21.8 2.5 36.6h.5a1888.3 1888.3 0 0033.7-.3h.8c1.7 0 2.8.7 3.4 2s1 4 1 8-.3 6.6-1 7.7c-.6 1.2-1.7 1.8-3.4 1.8h-1.9c-15.1 0-26-.2-32.8-.4v62c0 13.8 1.7 23.3 5.1 28.5 3.4 5.3 8.8 7.9 16 7.9 1.4 0 3-.3 4.6-1 1.7-.6 2.7-.9 3.1-.9 1.9 0 3.8 1 5.6 3 1.9 2 2.5 3.7 1.9 5.1a62.9 62.9 0 01-22 27.8 59.2 59.2 0 01-36.3 11.7c-16.1 0-28.4-4.9-36.9-14.6-3.3-3.8-6-8.1-8-13l-.4.4-.6.5c-17.4 17.1-33 25.7-46.7 25.7-18.7 0-31.7-13-39.2-39.2-5 12.3-12 22-21 28.9a49.2 49.2 0 01-30.7 10.3 37.6 37.6 0 01-29-12.5 44 44 0 01-11.4-30.7c0-9.5 1.6-17.2 5-23a41 41 0 0117-15.3c13.2-7 35.4-13.8 66.6-20.8l1-.2V138c0-10.8-1.7-19.3-5-25.5-3.3-6.4-7.9-9.6-13.7-9.6-2.8 0-4.4 1.6-5 4.7v.3l-2.1 14.8-.1.6a38.4 38.4 0 01-11.1 24c-6 5.4-13.5 8.1-22.4 8.1-5.2 0-9.6-1.5-13.1-4.6a16 16 0 01-5.3-12.7c0-10.7 8.8-21.7 26.3-33s37.5-17 60-17c41 0 61.7 15.2 62.1 45.7V192c0 4.6.3 8.4.7 11.4.4 3 1 5.4 1.7 7 .7 1.7 1.7 2.7 2.8 3.1 1.1.5 2.3.5 3.6 0a21 21 0 004.6-2.4l1.7-1c-.7-4-1-8.4-1-13v-85.8c0-1.5-.2-2.4-.6-2.8-.4-.5-1.4-.9-3-1.3l-11.2-1.6c-1.7-.2-2.5-2.3-2.5-6.2 0-4.4.8-6.7 2.5-7 15.9-3.7 29-8.6 39.3-14.6a144 144 0 0031-25.4c1.7-1.7 4-2.5 7.1-2.5zM290 88c27.5 0 49.7 7.2 66.6 21.6a73.1 73.1 0 0125.3 58.7c0 25.7-9 46-27 60.6S313.3 251 283.9 251c-27.5 0-49.7-7.2-66.6-21.6a73.1 73.1 0 01-25.3-58.7c0-25.7 9-46 27-60.6S260.8 88 290.1 88zm588.2 0c18.5 0 33.4 4.1 44.5 12.3 11.2 8.3 16.7 17.9 16.7 28.8 0 6.1-2.1 11.2-6.5 15.2s-9.9 6-16.7 6c-13 0-24-8.5-33-25.6-5.6-10.5-10-17.3-13-20.5s-6.1-4.8-9.7-4.8c-7.4 0-11 5.5-11 16.4 0 13.6 3 28.2 9.2 44a108 108 0 0023.2 37.5c8 8 16.5 12 25.4 12 7.6 0 15.3-3.3 23.2-9.9 1.4-1 3.5-.6 6.1 1.3 2.7 1.8 3.8 3.6 3.1 5.2a70.1 70.1 0 01-28.7 31.8 89 89 0 01-48.6 13.3 77.6 77.6 0 01-57.2-22.2 78.4 78.4 0 01-22.3-58c0-24.6 9-44.5 27-59.8 17.9-15.3 40.6-23 68.3-23zm-402.4-2.8c1.2 0 2.9.5 5 1.6 2 1 3 2 3 3.1l-.6 9.7a784.6 784.6 0 00-1.9 53.2v76.5c.1 2.2 1.3 3.6 3.5 4l.2.1 10.5 2.2.5.1h.4l10.5-2.2h.3c2.3-.5 3.4-2 3.4-4.4v-81.9c0-1.3-.2-2.1-.6-2.5-.4-.4-1.4-.8-3-1.3l-10.6-1.8h-.2c-1.5-.4-2.3-2.3-2.3-6 0-3.2.8-5.2 2.5-5.8a364 364 0 0074.3-42.9c.9-.6 1.7-.9 2.5-.9 1.3 0 3 .5 5 1.6s3 2 3 3v.1c0 .8-.1 4.9-.5 12a392.8 392.8 0 00-.7 21.8 64.5 64.5 0 0121.6-26 56.2 56.2 0 0134-10.6c16.2 0 29 4.6 38.5 14a52.6 52.6 0 0114 39v88.5c.2 2.3 1.4 3.7 3.8 4l10.5 2.3h.2c1.5.3 2.3 2.6 2.3 6.8 0 4.3-.8 6.5-2.5 6.5l-19-1c-11.7-.8-22-1.2-30.9-1.2s-18.8.4-29.9 1.1l-18 1.1c-1.7 0-2.6-2.2-2.6-6.5 0-4 .9-6.2 2.5-6.8l8.4-2.2.3-.1c1.5-.4 2.4-.8 2.8-1.3.4-.5.6-1.5.6-3v-61.9c0-14-2-24-6-29.7-4-5.8-11.2-8.7-21.6-8.7-3 0-5.3.4-6.8 1v99.6c0 1.3.2 2.2.6 2.7.4.5 1.5 1 3.1 1.4l8.4 2.1.1.1c1.6.7 2.4 3 2.4 6.8 0 4.3-.9 6.5-2.5 6.5l-18-1a454.5 454.5 0 00-60.7 0 868.8 868.8 0 01-20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2.4-.9zm-743 90c-7.6 0-11.4 6.7-11.4 20.3 0 16.6 3.7 38.3 11.2 65.2 7.4 26.9 14.5 43.7 21.1 50.3 3.1 3 6.3 4.6 9.7 4.6 7.6 0 11.5-6.8 11.5-20.4 0-16.5-3.8-38.2-11.2-65.2-7.5-26.9-14.5-43.6-21.2-50.2-3.1-3.1-6.3-4.7-9.6-4.7zm939.2 64.9c-6 0-9.1 4.3-9.1 12.8 0 8.4 2.4 15.9 7 22.4 4.8 6.6 10 9.8 15.4 9.8 2.2 0 4-.6 5.4-2l.3-.1v-22.3a20.6 20.6 0 00-6.7-14.8c-4-3.9-8-5.8-12.3-5.8zM450.6 0a34 34 0 0125.5 10.3c6.7 6.9 10 15.4 10 25.7a35 35 0 01-35.5 36 34 34 0 01-25.5-10.4 35.3 35.3 0 01-10-25.6c0-10.3 3.3-18.8 10-25.7A34 34 0 01450.6 0zM748 249a31 31 0 0022-8.2c6-5.5 9-12.2 9-20.3s-3-14.8-8.9-20.3-13.2-8.2-22-8.2-16.3 2.7-22.2 8.2-8.9 12.2-8.9 20.3 3 14.8 8.9 20.3 13.3 8.2 22.1 8.2z"/></svg>
311
- </a>
312
- <?php elseif ( '__wa__' === $this->settings['header'] ) : ?>
313
- <svg class="joinchat__wa" viewBox="0 0 120 28"><title>WhatsApp</title><path d="M117.2 17c0 .4-.2.7-.4 1-.1.3-.4.5-.7.7l-1 .2c-.5 0-.9 0-1.2-.2l-.7-.7a3 3 0 0 1-.4-1 5.4 5.4 0 0 1 0-2.3c0-.4.2-.7.4-1l.7-.7a2 2 0 0 1 1.1-.3 2 2 0 0 1 1.8 1l.4 1a5.3 5.3 0 0 1 0 2.3zm2.5-3c-.1-.7-.4-1.3-.8-1.7a4 4 0 0 0-1.3-1.2c-.6-.3-1.3-.4-2-.4-.6 0-1.2.1-1.7.4a3 3 0 0 0-1.2 1.1V11H110v13h2.7v-4.5c.4.4.8.8 1.3 1 .5.3 1 .4 1.6.4a4 4 0 0 0 3.2-1.5c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3-.6-.6-.5-.8-.6H9c-.2 0-.6.1-.9.5C7.8 8.2 7 9 7 10.7c0 1.7 1.3 3.4 1.4 3.6.2.3 2.5 3.7 6 5.2l1.9.8c.8.2 1.6.2 2.2.1.6-.1 2-.8 2.3-1.6.3-.9.3-1.5.2-1.7l-.7-.4zM14 25.3c-2 0-4-.5-5.8-1.6l-.4-.2-4.4 1.1 1.2-4.2-.3-.5A11.5 11.5 0 0 1 22.1 5.7 11.5 11.5 0 0 1 14 25.3zM14 0A13.8 13.8 0 0 0 2 20.7L0 28l7.3-2A13.8 13.8 0 1 0 14 0z"/></svg>
314
- <?php elseif ( '' !== $this->settings['header'] ) : ?>
315
- <span class="joinchat__header__text"><?php echo $this->settings['header']; ?></span>
316
- <?php endif; ?>
317
- <div class="joinchat__close" aria-label="<?php _e( 'Close', 'creame-whatsapp-me' ); ?>"></div>
318
- </div>
319
- <div class="joinchat__box__scroll">
320
- <div class="joinchat__box__content">
321
- <?php echo $box_content; ?>
322
- </div>
323
- </div>
324
- </div>
325
- <?php endif; ?>
326
- <svg height="0" width="0"><defs><clipPath id="joinchat__message__peak"><path d="M17 25V0C17 12.877 6.082 14.9 1.031 15.91c-1.559.31-1.179 2.272.004 2.272C9.609 18.182 17 18.088 17 25z"/></clipPath></defs></svg>
327
- </div>
328
- <?php
329
  $html_output = ob_get_clean();
330
 
331
  echo apply_filters( 'joinchat_html_output', $html_output, $this->settings );
332
  }
333
  }
334
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
335
  /**
336
  * Check visibility on current page
337
  *
279
  $box_content = apply_filters( 'joinchat_content', $box_content, $this->settings );
280
 
281
  ob_start();
282
+ include __DIR__ . '/partials/html.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  $html_output = ob_get_clean();
284
 
285
  echo apply_filters( 'joinchat_html_output', $html_output, $this->settings );
286
  }
287
  }
288
 
289
+ /**
290
+ * Prints a fallback script to open WhatsApp for html triggers when Join.chat is not showed
291
+ *
292
+ * @since 4.1.5
293
+ * @return void
294
+ */
295
+ public function links_script() {
296
+
297
+ if ( ! $this->show && $this->settings['telephone'] && wp_script_is( 'jquery', 'enqueued' ) ) {
298
+ $args = array(
299
+ 'tel' => $this->settings['telephone'],
300
+ 'msg' => $this->settings['message_send'],
301
+ 'web' => $this->settings['whatsapp_web'],
302
+ );
303
+
304
+ include __DIR__ . '/partials/script.php';
305
+ }
306
+
307
+ }
308
+
309
  /**
310
  * Check visibility on current page
311
  *
public/css/joinchat.css CHANGED
@@ -38,11 +38,19 @@
38
  box-sizing: border-box;
39
  }
40
 
 
 
 
 
41
  .joinchat--show {
42
  transform: scale3d(1, 1, 1);
43
  transition: transform 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
44
  }
45
 
 
 
 
 
46
  .joinchat.joinchat--left {
47
  right: auto;
48
  left: var(--sep);
38
  box-sizing: border-box;
39
  }
40
 
41
+ .joinchat > div {
42
+ display: none;
43
+ }
44
+
45
  .joinchat--show {
46
  transform: scale3d(1, 1, 1);
47
  transition: transform 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
48
  }
49
 
50
+ .joinchat--show > div {
51
+ display: block;
52
+ }
53
+
54
  .joinchat.joinchat--left {
55
  right: auto;
56
  left: var(--sep);
public/css/joinchat.min.css CHANGED
@@ -1 +1 @@
1
- .joinchat{--bottom:20px;--sep:20px;--header:70px;--btn:60px;--vh:100vh;--red:37;--green:211;--blue:102;--rgb:var(--red),var(--green),var(--blue);--color:rgb(var(--rgb));--dark:rgb(calc(var(--red) - 75),calc(var(--green) - 75),calc(var(--blue) - 75));--hover:rgb(calc(var(--red) + 50),calc(var(--green) + 50),calc(var(--blue) + 50));--bg:rgba(var(--rgb),0.04);--tolerance:210;--bw:calc((var(--red)*0.2126 + var(--green)*0.7152 + var(--blue)*0.0722 - var(--tolerance))*-100000);--text:rgba(var(--bw),var(--bw),var(--bw),min(1,max(0.7,var(--bw))));--msg:var(--color);position:fixed;z-index:1000;right:var(--sep);bottom:var(--bottom);color:var(--text);font:normal normal normal 16px/1.625em -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;letter-spacing:0;transform:scale3d(0,0,0);transition:transform .3s ease-in-out;-webkit-user-select:none;-ms-user-select:none;user-select:none;-webkit-font-smoothing:antialiased}.joinchat *,.joinchat :after,.joinchat :before{box-sizing:border-box}.joinchat--show{transform:scaleX(1);transition:transform .5s cubic-bezier(.18,.89,.32,1.28)}.joinchat.joinchat--left{right:auto;left:var(--sep)}@media (max-width:480px),(orientation:landscape) and (max-width:767px){.joinchat{--bottom:6px;--sep:6px;--header:55px}}.joinchat.joinchat--dark{--msg:var(--dark)}@media (color-index:48){.joinchat.joinchat--dark-auto{--msg:var(--dark)}}@media (prefers-color-scheme:dark){.joinchat.joinchat--dark-auto{--msg:var(--dark)}}.joinchat__button{display:flex;flex-direction:row;position:absolute;z-index:2;bottom:8px;right:8px;height:var(--btn);min-width:var(--btn);max-width:95vw;background:#25d366;color:inherit;border-radius:calc(var(--btn)/2);box-shadow:1px 6px 24px 0 rgba(7,94,84,.24);cursor:pointer;transition:background .2s linear;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:background-color,width}.joinchat__button:hover{background:#128c7e;transition:background 1.5s linear}.joinchat__button:active{background:#128c7e;transition:none}.joinchat--chatbox .joinchat__button{background:var(--color);transition:background .2s linear;box-shadow:0 1px 2px 0 rgba(0,0,0,.3)}.joinchat--chatbox .joinchat__button:active,.joinchat--chatbox .joinchat__button:hover{background:var(--hover)}[dir=rtl] .joinchat__button{flex-direction:row-reverse}.joinchat--left .joinchat__button{right:auto;left:8px;flex-direction:row-reverse}[dir=rtl] .joinchat--left .joinchat__button{flex-direction:row}.joinchat__button__open{width:var(--btn);height:var(--btn);background:transparent url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3.516 3.516c4.686-4.686 12.284-4.686 16.97 0 4.686 4.686 4.686 12.283 0 16.97a12.004 12.004 0 01-13.754 2.299l-5.814.735a.392.392 0 01-.438-.44l.748-5.788A12.002 12.002 0 013.517 3.517zm3.61 17.043l.3.158a9.846 9.846 0 0011.534-1.758c3.843-3.843 3.843-10.074 0-13.918-3.843-3.843-10.075-3.843-13.918 0a9.846 9.846 0 00-1.747 11.554l.16.303-.51 3.942a.196.196 0 00.219.22l3.961-.501zm6.534-7.003l-.933 1.164a9.843 9.843 0 01-3.497-3.495l1.166-.933a.792.792 0 00.23-.94L9.561 6.96a.793.793 0 00-.924-.445 1291.6 1291.6 0 00-2.023.524.797.797 0 00-.588.88 11.754 11.754 0 0010.005 10.005.797.797 0 00.88-.587l.525-2.023a.793.793 0 00-.445-.923L14.6 13.327a.792.792 0 00-.94.23z'/%3E%3C/svg%3E") 50% no-repeat;background-size:60%}.joinchat--chatbox .joinchat__button__open{display:none}.joinchat__button__image{position:absolute;top:1px;right:1px;width:calc(var(--btn) - 2px);height:calc(var(--btn) - 2px);border-radius:50%;overflow:hidden;opacity:0}.joinchat__button__image img{display:block;width:100%;height:100%;object-fit:cover}.joinchat--show .joinchat__button__image{animation:joinchat_image_loop 20s linear 5s infinite normal both}.joinchat--image .joinchat__button__image{opacity:1;animation:none}.joinchat--chatbox .joinchat__button__image{display:none}.joinchat__button__send{display:none;width:var(--btn);height:var(--btn);max-width:var(--btn);padding:12px 11px 12px 13px;margin:0;flex-shrink:0}.joinchat--chatbox .joinchat__button__send{display:block}.joinchat__button__send path{fill:none!important;stroke:var(--text)!important}.joinchat__button__send .joinchat_svg__plain{stroke-dasharray:1097;stroke-dashoffset:1097;animation:joinchat_plain 6s .2s ease-in-out infinite}.joinchat__button__send .joinchat_svg__chat{stroke-dasharray:1020;stroke-dashoffset:1020;animation:joinchat_chat 6s 3.2s ease-in-out infinite}.joinchat__button__sendtext{padding:0;max-width:0;font-weight:600;line-height:var(--btn);white-space:nowrap;opacity:0;overflow:hidden;transition:none}.joinchat--chatbox .joinchat__button__sendtext{padding:0 4px 0 24px;max-width:200px;opacity:1;transition:max-width .2s linear,opacity .4s ease-out .2s}.joinchat--chatbox.joinchat--left .joinchat__button__sendtext{padding:0 24px 0 4px}.joinchat__badge{position:absolute;top:-4px;right:-4px;width:20px;height:20px;border:none;border-radius:50%;background:#e82c0c;color:#fff;font-size:12px;font-weight:600;line-height:20px;text-align:center;box-shadow:none;opacity:0;pointer-events:none}.joinchat__badge.joinchat__badge--in{animation:joinchat_badge_in .5s cubic-bezier(.27,.9,.41,1.28) 1 both}.joinchat__badge.joinchat__badge--out{animation:joinchat_badge_out .4s cubic-bezier(.215,.61,.355,1) 1 both}.joinchat__tooltip{position:absolute;top:14px;right:76px;max-width:calc(100vw - 105px);height:32px;padding:0 14px;border:none;border-radius:16px;background:#fff;color:rgba(0,0,0,.8);line-height:31px;white-space:nowrap;opacity:0;transition:opacity .3s ease-out .4s;filter:drop-shadow(0 1px 4px rgba(0,0,0,.4));transform:translateZ(0);pointer-events:none}.joinchat__tooltip:after{content:"";display:block;position:absolute;top:10px;right:-6px;border:8px solid transparent;border-width:6px 0 6px 8px;border-left-color:#fff}.joinchat__tooltip div{overflow:hidden;text-overflow:ellipsis}.joinchat--tooltip .joinchat__tooltip{animation:joinchat_tootlip 20s linear 5s 1 normal both}@media (hover:hover){.joinchat__button:hover .joinchat__tooltip{opacity:1;animation:none;transition:opacity .2s}}.joinchat--chatbox .joinchat__tooltip{display:none}.joinchat--left .joinchat__tooltip{right:auto;left:76px}.joinchat--left .joinchat__tooltip:after{left:-6px;right:auto;border-color:transparent;border-width:6px 8px 6px 0;border-right-color:#fff}.joinchat__box{display:flex;flex-direction:column;position:absolute;bottom:0;right:0;z-index:1;width:calc(100vw - var(--sep)*2);max-width:400px;min-height:170px;max-height:calc(var(--vh) - var(--bottom) - var(--sep));border-radius:32px;background:transparent;box-shadow:0 2px 6px 0 rgba(0,0,0,.5);text-align:left;overflow:hidden;transform:scale3d(0,0,0);opacity:0;transition:max-height .2s ease-out,opacity .4s ease-out,transform 0s linear .3s}.joinchat--chatbox .joinchat__box{opacity:1;transform:scaleX(1);transition:max-height .2s ease-out,opacity .2s ease-out,transform 0s linear}.joinchat--left .joinchat__box{right:auto;left:0}.joinchat__header{display:flex;flex-flow:row;align-items:center;position:relative;flex-shrink:0;height:var(--header);padding:0 70px 0 26px;margin:0;background:var(--color);text-align:left}[dir=rtl] .joinchat__header{text-align:right}.joinchat--dark .joinchat__header{background:var(--dark)}.joinchat__header__text{font-size:19px;font-weight:600;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.8}.joinchat__powered{font-size:11px;line-height:18px;color:inherit!important;text-decoration:none!important;fill:currentColor;opacity:.8}.joinchat__powered svg{display:inline-block;width:auto;height:18px;vertical-align:-30%}.joinchat__powered:active,.joinchat__powered:hover{color:inherit!important;text-decoration:none!important;opacity:.9}.joinchat__wa{height:28px;width:auto;fill:currentColor;opacity:.8}.joinchat__close{position:absolute;top:50%;right:24px;width:34px;height:34px;margin-top:-16px;border-radius:50%;background:rgba(0,0,0,.4) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M24 2.4L21.6 0 12 9.6 2.4 0 0 2.4 9.6 12 0 21.6 2.4 24l9.6-9.6 9.6 9.6 2.4-2.4-9.6-9.6L24 2.4z'/%3E%3C/svg%3E") 50% no-repeat;background-size:12px;cursor:pointer;transition:background-color .3s ease-out;-webkit-tap-highlight-color:rgba(0,0,0,0)}.joinchat__close:hover{background-color:rgba(0,0,0,.6)}[dir=rtl] .joinchat__close{right:auto;left:24px}.joinchat__box__scroll{padding:20px 0 70px;padding-bottom:calc(var(--btn) + 10px);background:#fff linear-gradient(0deg,var(--bg),var(--bg));overflow-x:hidden;overflow-y:auto;will-change:scroll-position}.joinchat__box__scroll::-webkit-scrollbar{width:5px;background:transparent}.joinchat__box__scroll::-webkit-scrollbar-thumb{border-radius:3px;background:transparent}.joinchat__box__scroll:hover::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2)}.joinchat--blur .joinchat__box__scroll{background:rgba(var(--rgb),.2);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.joinchat--dark .joinchat__box__scroll{background:#1a1a1a}@supports (-webkit-overflow-scrolling:touch){.joinchat__box__scroll{overflow-y:scroll;-webkit-overflow-scrolling:touch}}@media (max-width:480px),(orientation:landscape) and (max-width:767px){.joinchat__header__text{font-size:17px}.joinchat__close{margin-top:-14px;width:28px;height:28px}.joinchat__box__scroll{padding-top:15px}}@media (color-index:48){.joinchat--dark-auto .joinchat__box__scroll{background:#1a1a1a}.joinchat--dark-auto .joinchat__header{background:var(--dark)}}@media (prefers-color-scheme:dark){.joinchat--dark-auto .joinchat__box__scroll{background:#1a1a1a}.joinchat--dark-auto .joinchat__header{background:var(--dark)}}.joinchat__message{position:relative;min-height:60px;padding:17px 20px;margin:0 26px 26px;border-radius:32px;background:#fff;color:#4a4a4a;filter:drop-shadow(0 1px 2px rgba(0,0,0,.3));transform:translateZ(0)}.joinchat__message:before{content:"";display:block;position:absolute;bottom:20px;left:-15px;width:17px;height:25px;background:inherit;-webkit-clip-path:url(#joinchat__message__peak);clip-path:url(#joinchat__message__peak)}.joinchat--dark .joinchat__message{background:#505050;color:#d8d8d8}@media (color-index:48){.joinchat--dark-auto .joinchat__message{background:#505050;color:#d8d8d8}}@media (prefers-color-scheme:dark){.joinchat--dark-auto .joinchat__message{background:#505050;color:#d8d8d8}}@media (max-width:480px),(orientation:landscape) and (max-width:767px){.joinchat__message{padding:18px 16px;line-height:24px;margin:0 20px 20px}}@keyframes joinchat_badge_in{0%{opacity:0;transform:translateY(50px)}to{opacity:1;transform:translateY(0)}}@keyframes joinchat_badge_out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-20px)}}@keyframes joinchat_plain{0%,50%,to{stroke-dashoffset:1097}5%,45%{stroke-dashoffset:0}}@keyframes joinchat_chat{0%,50%,to{stroke-dashoffset:1020}5%,45%{stroke-dashoffset:0}}@keyframes joinchat_image_loop{0%{opacity:0}3%,20%{opacity:1}25%,to{opacity:0}}@keyframes joinchat_tootlip{0%{opacity:0;transform:scaleY(0)}1%,20%{opacity:1;transform:scaleY(1)}25%,to{opacity:0;transform:scaleY(1)}}
1
+ .joinchat{--bottom:20px;--sep:20px;--header:70px;--btn:60px;--vh:100vh;--red:37;--green:211;--blue:102;--rgb:var(--red),var(--green),var(--blue);--color:rgb(var(--rgb));--dark:rgb(calc(var(--red) - 75),calc(var(--green) - 75),calc(var(--blue) - 75));--hover:rgb(calc(var(--red) + 50),calc(var(--green) + 50),calc(var(--blue) + 50));--bg:rgba(var(--rgb),0.04);--tolerance:210;--bw:calc((var(--red)*0.2126 + var(--green)*0.7152 + var(--blue)*0.0722 - var(--tolerance))*-100000);--text:rgba(var(--bw),var(--bw),var(--bw),min(1,max(0.7,var(--bw))));--msg:var(--color);position:fixed;z-index:1000;right:var(--sep);bottom:var(--bottom);color:var(--text);font:normal normal normal 16px/1.625em -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;letter-spacing:0;transform:scale3d(0,0,0);transition:transform .3s ease-in-out;-webkit-user-select:none;-ms-user-select:none;user-select:none;-webkit-font-smoothing:antialiased}.joinchat *,.joinchat :after,.joinchat :before{box-sizing:border-box}.joinchat>div{display:none}.joinchat--show{transform:scaleX(1);transition:transform .5s cubic-bezier(.18,.89,.32,1.28)}.joinchat--show>div{display:block}.joinchat.joinchat--left{right:auto;left:var(--sep)}@media (max-width:480px),(orientation:landscape) and (max-width:767px){.joinchat{--bottom:6px;--sep:6px;--header:55px}}.joinchat.joinchat--dark{--msg:var(--dark)}@media (color-index:48){.joinchat.joinchat--dark-auto{--msg:var(--dark)}}@media (prefers-color-scheme:dark){.joinchat.joinchat--dark-auto{--msg:var(--dark)}}.joinchat__button{display:flex;flex-direction:row;position:absolute;z-index:2;bottom:8px;right:8px;height:var(--btn);min-width:var(--btn);max-width:95vw;background:#25d366;color:inherit;border-radius:calc(var(--btn)/2);box-shadow:1px 6px 24px 0 rgba(7,94,84,.24);cursor:pointer;transition:background .2s linear;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:background-color,width}.joinchat__button:hover{background:#128c7e;transition:background 1.5s linear}.joinchat__button:active{background:#128c7e;transition:none}.joinchat--chatbox .joinchat__button{background:var(--color);transition:background .2s linear;box-shadow:0 1px 2px 0 rgba(0,0,0,.3)}.joinchat--chatbox .joinchat__button:active,.joinchat--chatbox .joinchat__button:hover{background:var(--hover)}[dir=rtl] .joinchat__button{flex-direction:row-reverse}.joinchat--left .joinchat__button{right:auto;left:8px;flex-direction:row-reverse}[dir=rtl] .joinchat--left .joinchat__button{flex-direction:row}.joinchat__button__open{width:var(--btn);height:var(--btn);background:transparent url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3.516 3.516c4.686-4.686 12.284-4.686 16.97 0 4.686 4.686 4.686 12.283 0 16.97a12.004 12.004 0 01-13.754 2.299l-5.814.735a.392.392 0 01-.438-.44l.748-5.788A12.002 12.002 0 013.517 3.517zm3.61 17.043l.3.158a9.846 9.846 0 0011.534-1.758c3.843-3.843 3.843-10.074 0-13.918-3.843-3.843-10.075-3.843-13.918 0a9.846 9.846 0 00-1.747 11.554l.16.303-.51 3.942a.196.196 0 00.219.22l3.961-.501zm6.534-7.003l-.933 1.164a9.843 9.843 0 01-3.497-3.495l1.166-.933a.792.792 0 00.23-.94L9.561 6.96a.793.793 0 00-.924-.445 1291.6 1291.6 0 00-2.023.524.797.797 0 00-.588.88 11.754 11.754 0 0010.005 10.005.797.797 0 00.88-.587l.525-2.023a.793.793 0 00-.445-.923L14.6 13.327a.792.792 0 00-.94.23z'/%3E%3C/svg%3E") 50% no-repeat;background-size:60%}.joinchat--chatbox .joinchat__button__open{display:none}.joinchat__button__image{position:absolute;top:1px;right:1px;width:calc(var(--btn) - 2px);height:calc(var(--btn) - 2px);border-radius:50%;overflow:hidden;opacity:0}.joinchat__button__image img{display:block;width:100%;height:100%;object-fit:cover}.joinchat--show .joinchat__button__image{animation:joinchat_image_loop 20s linear 5s infinite normal both}.joinchat--image .joinchat__button__image{opacity:1;animation:none}.joinchat--chatbox .joinchat__button__image{display:none}.joinchat__button__send{display:none;width:var(--btn);height:var(--btn);max-width:var(--btn);padding:12px 11px 12px 13px;margin:0;flex-shrink:0}.joinchat--chatbox .joinchat__button__send{display:block}.joinchat__button__send path{fill:none!important;stroke:var(--text)!important}.joinchat__button__send .joinchat_svg__plain{stroke-dasharray:1097;stroke-dashoffset:1097;animation:joinchat_plain 6s .2s ease-in-out infinite}.joinchat__button__send .joinchat_svg__chat{stroke-dasharray:1020;stroke-dashoffset:1020;animation:joinchat_chat 6s 3.2s ease-in-out infinite}.joinchat__button__sendtext{padding:0;max-width:0;font-weight:600;line-height:var(--btn);white-space:nowrap;opacity:0;overflow:hidden;transition:none}.joinchat--chatbox .joinchat__button__sendtext{padding:0 4px 0 24px;max-width:200px;opacity:1;transition:max-width .2s linear,opacity .4s ease-out .2s}.joinchat--chatbox.joinchat--left .joinchat__button__sendtext{padding:0 24px 0 4px}.joinchat__badge{position:absolute;top:-4px;right:-4px;width:20px;height:20px;border:none;border-radius:50%;background:#e82c0c;color:#fff;font-size:12px;font-weight:600;line-height:20px;text-align:center;box-shadow:none;opacity:0;pointer-events:none}.joinchat__badge.joinchat__badge--in{animation:joinchat_badge_in .5s cubic-bezier(.27,.9,.41,1.28) 1 both}.joinchat__badge.joinchat__badge--out{animation:joinchat_badge_out .4s cubic-bezier(.215,.61,.355,1) 1 both}.joinchat__tooltip{position:absolute;top:14px;right:76px;max-width:calc(100vw - 105px);height:32px;padding:0 14px;border:none;border-radius:16px;background:#fff;color:rgba(0,0,0,.8);line-height:31px;white-space:nowrap;opacity:0;transition:opacity .3s ease-out .4s;filter:drop-shadow(0 1px 4px rgba(0,0,0,.4));transform:translateZ(0);pointer-events:none}.joinchat__tooltip:after{content:"";display:block;position:absolute;top:10px;right:-6px;border:8px solid transparent;border-width:6px 0 6px 8px;border-left-color:#fff}.joinchat__tooltip div{overflow:hidden;text-overflow:ellipsis}.joinchat--tooltip .joinchat__tooltip{animation:joinchat_tootlip 20s linear 5s 1 normal both}@media (hover:hover){.joinchat__button:hover .joinchat__tooltip{opacity:1;animation:none;transition:opacity .2s}}.joinchat--chatbox .joinchat__tooltip{display:none}.joinchat--left .joinchat__tooltip{right:auto;left:76px}.joinchat--left .joinchat__tooltip:after{left:-6px;right:auto;border-color:transparent;border-width:6px 8px 6px 0;border-right-color:#fff}.joinchat__box{display:flex;flex-direction:column;position:absolute;bottom:0;right:0;z-index:1;width:calc(100vw - var(--sep)*2);max-width:400px;min-height:170px;max-height:calc(var(--vh) - var(--bottom) - var(--sep));border-radius:32px;background:transparent;box-shadow:0 2px 6px 0 rgba(0,0,0,.5);text-align:left;overflow:hidden;transform:scale3d(0,0,0);opacity:0;transition:max-height .2s ease-out,opacity .4s ease-out,transform 0s linear .3s}.joinchat--chatbox .joinchat__box{opacity:1;transform:scaleX(1);transition:max-height .2s ease-out,opacity .2s ease-out,transform 0s linear}.joinchat--left .joinchat__box{right:auto;left:0}.joinchat__header{display:flex;flex-flow:row;align-items:center;position:relative;flex-shrink:0;height:var(--header);padding:0 70px 0 26px;margin:0;background:var(--color);text-align:left}[dir=rtl] .joinchat__header{text-align:right}.joinchat--dark .joinchat__header{background:var(--dark)}.joinchat__header__text{font-size:19px;font-weight:600;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.8}.joinchat__powered{font-size:11px;line-height:18px;color:inherit!important;text-decoration:none!important;fill:currentColor;opacity:.8}.joinchat__powered svg{display:inline-block;width:auto;height:18px;vertical-align:-30%}.joinchat__powered:active,.joinchat__powered:hover{color:inherit!important;text-decoration:none!important;opacity:.9}.joinchat__wa{height:28px;width:auto;fill:currentColor;opacity:.8}.joinchat__close{position:absolute;top:50%;right:24px;width:34px;height:34px;margin-top:-16px;border-radius:50%;background:rgba(0,0,0,.4) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M24 2.4L21.6 0 12 9.6 2.4 0 0 2.4 9.6 12 0 21.6 2.4 24l9.6-9.6 9.6 9.6 2.4-2.4-9.6-9.6L24 2.4z'/%3E%3C/svg%3E") 50% no-repeat;background-size:12px;cursor:pointer;transition:background-color .3s ease-out;-webkit-tap-highlight-color:rgba(0,0,0,0)}.joinchat__close:hover{background-color:rgba(0,0,0,.6)}[dir=rtl] .joinchat__close{right:auto;left:24px}.joinchat__box__scroll{padding:20px 0 70px;padding-bottom:calc(var(--btn) + 10px);background:#fff linear-gradient(0deg,var(--bg),var(--bg));overflow-x:hidden;overflow-y:auto;will-change:scroll-position}.joinchat__box__scroll::-webkit-scrollbar{width:5px;background:transparent}.joinchat__box__scroll::-webkit-scrollbar-thumb{border-radius:3px;background:transparent}.joinchat__box__scroll:hover::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2)}.joinchat--blur .joinchat__box__scroll{background:rgba(var(--rgb),.2);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.joinchat--dark .joinchat__box__scroll{background:#1a1a1a}@supports (-webkit-overflow-scrolling:touch){.joinchat__box__scroll{overflow-y:scroll;-webkit-overflow-scrolling:touch}}@media (max-width:480px),(orientation:landscape) and (max-width:767px){.joinchat__header__text{font-size:17px}.joinchat__close{margin-top:-14px;width:28px;height:28px}.joinchat__box__scroll{padding-top:15px}}@media (color-index:48){.joinchat--dark-auto .joinchat__box__scroll{background:#1a1a1a}.joinchat--dark-auto .joinchat__header{background:var(--dark)}}@media (prefers-color-scheme:dark){.joinchat--dark-auto .joinchat__box__scroll{background:#1a1a1a}.joinchat--dark-auto .joinchat__header{background:var(--dark)}}.joinchat__message{position:relative;min-height:60px;padding:17px 20px;margin:0 26px 26px;border-radius:32px;background:#fff;color:#4a4a4a;filter:drop-shadow(0 1px 2px rgba(0,0,0,.3));transform:translateZ(0)}.joinchat__message:before{content:"";display:block;position:absolute;bottom:20px;left:-15px;width:17px;height:25px;background:inherit;-webkit-clip-path:url(#joinchat__message__peak);clip-path:url(#joinchat__message__peak)}.joinchat--dark .joinchat__message{background:#505050;color:#d8d8d8}@media (color-index:48){.joinchat--dark-auto .joinchat__message{background:#505050;color:#d8d8d8}}@media (prefers-color-scheme:dark){.joinchat--dark-auto .joinchat__message{background:#505050;color:#d8d8d8}}@media (max-width:480px),(orientation:landscape) and (max-width:767px){.joinchat__message{padding:18px 16px;line-height:24px;margin:0 20px 20px}}@keyframes joinchat_badge_in{0%{opacity:0;transform:translateY(50px)}to{opacity:1;transform:translateY(0)}}@keyframes joinchat_badge_out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-20px)}}@keyframes joinchat_plain{0%,50%,to{stroke-dashoffset:1097}5%,45%{stroke-dashoffset:0}}@keyframes joinchat_chat{0%,50%,to{stroke-dashoffset:1020}5%,45%{stroke-dashoffset:0}}@keyframes joinchat_image_loop{0%{opacity:0}3%,20%{opacity:1}25%,to{opacity:0}}@keyframes joinchat_tootlip{0%{opacity:0;transform:scaleY(0)}1%,20%{opacity:1;transform:scaleY(1)}25%,to{opacity:0;transform:scaleY(1)}}
public/js/joinchat.js CHANGED
@@ -17,10 +17,13 @@
17
 
18
  // Trigger Google Analytics event
19
  joinchat_obj.send_event = function (label, action) {
20
- var ga_tracker = win[this.settings.ga_tracker || 'ga'];
21
  label = label || '';
22
  action = action || 'click';
23
 
 
 
 
 
24
  // Send Google Analtics custom event (Universal Analtics - analytics.js) or (Global Site Tag - gtag.js)
25
  if (typeof ga_tracker == 'function' && typeof ga_tracker.getAll == 'function') {
26
  ga_tracker('set', 'transport', 'beacon');
@@ -144,8 +147,8 @@
144
  if (joinchat_obj.is_mobile || !joinchat_obj.settings.mobile_only) {
145
  joinchat_magic();
146
  } else {
147
- // Launch WhatsApp when click on nodes with classes "joinchat_open" "joinchat_app"
148
- $(doc).on('click', '.joinchat_open, .joinchat_app', function (e) {
149
  e.preventDefault();
150
  joinchat_obj.open_whatsapp();
151
  });
@@ -256,10 +259,11 @@
256
  }
257
 
258
  // Open chatbox or launch WhatsApp when click on nodes with classes "joinchat_open" "joinchat_app"
259
- $(doc).on('click', '.joinchat_open, .joinchat_app', function (e) {
 
260
  e.preventDefault();
261
- if ($(this).hasClass('joinchat_app') || !has_chatbox) joinchat_obj.open_whatsapp(); // WhatsApp direct
262
- else if (!joinchat_obj.chatbox) chatbox_show(); // Open chatbox
263
  });
264
 
265
  // Close chatbox when click on nodes with class "joinchat_close"
17
 
18
  // Trigger Google Analytics event
19
  joinchat_obj.send_event = function (label, action) {
 
20
  label = label || '';
21
  action = action || 'click';
22
 
23
+ // Can pass setting 'ga_tracker' for custom GA tracker name
24
+ // Compatible with GADP for WordPress by MonsterInsights tracker name
25
+ var ga_tracker = win[this.settings.ga_tracker] || win['ga'] || win['__gaTracker'];
26
+
27
  // Send Google Analtics custom event (Universal Analtics - analytics.js) or (Global Site Tag - gtag.js)
28
  if (typeof ga_tracker == 'function' && typeof ga_tracker.getAll == 'function') {
29
  ga_tracker('set', 'transport', 'beacon');
147
  if (joinchat_obj.is_mobile || !joinchat_obj.settings.mobile_only) {
148
  joinchat_magic();
149
  } else {
150
+ // Launch WhatsApp when click on nodes with classes "joinchat_open" "joinchat_app" or links with href
151
+ $(doc).on('click', '.joinchat_open, .joinchat_app, a[href="#joinchat"], a[href="#whatsapp"]', function (e) {
152
  e.preventDefault();
153
  joinchat_obj.open_whatsapp();
154
  });
259
  }
260
 
261
  // Open chatbox or launch WhatsApp when click on nodes with classes "joinchat_open" "joinchat_app"
262
+ // or links with href "#joinchat" or "#whatsapp"
263
+ $(doc).on('click', '.joinchat_open, .joinchat_app, a[href="#joinchat"], a[href="#whatsapp"]', function (e) {
264
  e.preventDefault();
265
+ if (!has_chatbox || $(this).is('.joinchat_app, a[href="#whatsapp"]')) joinchat_obj.open_whatsapp(); // WhatsApp direct
266
+ else chatbox_show(); // Open chatbox
267
  });
268
 
269
  // Close chatbox when click on nodes with class "joinchat_close"
public/js/joinchat.min.js CHANGED
@@ -1 +1 @@
1
- !function(p,d,m){"use strict";d.joinchat_obj=d.joinchat_obj||{},joinchat_obj=p.extend({$div:null,settings:null,store:null,chatbox:!1,is_mobile:!1},joinchat_obj),joinchat_obj.$=function(t){return p(t||this.$div,this.$div)},joinchat_obj.send_event=function(o,e){var t=d[this.settings.ga_tracker||"ga"];o=o||"",e=e||"click","function"==typeof t&&"function"==typeof t.getAll?(t("set","transport","beacon"),t.getAll().forEach(function(t){t.send("event","JoinChat",e,o)})):"function"==typeof gtag&&gtag("event",e,{event_category:"JoinChat",event_label:o,transport_type:"beacon"}),"object"==typeof dataLayer&&dataLayer.push({event:"JoinChat",eventAction:e,eventLabel:o}),"function"==typeof fbq&&fbq("trackCustom","JoinChat",{eventAction:e,eventLabel:o})},joinchat_obj.whatsapp_link=function(t,o,e){return((e=void 0!==e?e:this.settings.whatsapp_web&&!this.is_mobile)?"https://web.whatsapp.com/send":"https://api.whatsapp.com/send")+"?phone="+encodeURIComponent(t)+"&text="+encodeURIComponent(o||"")},joinchat_obj.chatbox_show=function(){this.chatbox||(this.chatbox=!0,this.$div.addClass("joinchat--chatbox"),this.settings.message_badge&&this.$(".joinchat__badge").hasClass("joinchat__badge--in")&&this.$(".joinchat__badge").toggleClass("joinchat__badge--in joinchat__badge--out"),p(m).trigger("joinchat:show"))},joinchat_obj.chatbox_hide=function(){this.chatbox&&(this.chatbox=!1,this.$div.removeClass("joinchat--chatbox joinchat--tooltip"),this.settings.message_badge&&this.$(".joinchat__badge").removeClass("joinchat__badge--out"),p(m).trigger("joinchat:hide"))},joinchat_obj.save_hash=function(){var t=this.settings.message_hash||"none",o=(this.store.getItem("joinchat_hashes")||"").split(",").filter(Boolean);-1===o.indexOf(t)&&(o.push(t),this.store.setItem("joinchat_hashes",o.join(",")))},joinchat_obj.open_whatsapp=function(t,o){t={link:this.whatsapp_link(t||this.settings.telephone,o||this.settings.message_send)},o=new RegExp("^https?://(wa.me|(api|web|chat).whatsapp.com|"+location.hostname.replace(".",".")+")/.*","i");p(m).trigger("joinchat:open",[t,this.settings]),o.test(t.link)?(this.send_event(t.link),d.open(t.link,"joinchat","noopener")):console.error("Join.chat: the link doesn't seem safe, it must point to the current domain or whatsapp.com")},p(function(){joinchat_obj.$div=p(".joinchat"),joinchat_obj.settings=joinchat_obj.$div.data("settings"),joinchat_obj.is_mobile=!!navigator.userAgent.match(/Android|iPhone|BlackBerry|IEMobile|Opera Mini/i);try{localStorage.setItem("test",1),localStorage.removeItem("test"),joinchat_obj.store=localStorage}catch(t){joinchat_obj.store={_data:{},setItem:function(t,o){this._data[t]=String(o)},getItem:function(t){return this._data.hasOwnProperty(t)?this._data[t]:null}}}if(void 0===joinchat_obj.settings)try{joinchat_obj.settings=JSON.parse(joinchat_obj.$div.attr("data-settings"))}catch(t){joinchat_obj.settings=void 0}joinchat_obj.$div.length&&joinchat_obj.settings&&joinchat_obj.settings.telephone&&(joinchat_obj.is_mobile||!joinchat_obj.settings.mobile_only?function(){p(m).trigger("joinchat:starting");var t,o,e=1e3*joinchat_obj.settings.button_delay,n=1e3*joinchat_obj.settings.message_delay,i=!!joinchat_obj.settings.message_hash,a=!!joinchat_obj.$(".joinchat__box").length,s=parseInt(joinchat_obj.store.getItem("joinchat_views")||1)>=joinchat_obj.settings.message_views,h=-1!==(joinchat_obj.store.getItem("joinchat_hashes")||"").split(",").filter(Boolean).indexOf(joinchat_obj.settings.message_hash||"none");function c(){clearTimeout(o),joinchat_obj.chatbox_show()}function j(){joinchat_obj.save_hash(),joinchat_obj.chatbox_hide()}var _,b,r="joinchat--show";h||i&&n&&!joinchat_obj.settings.message_badge&&s||(r+=" joinchat--tooltip");setTimeout(function(){joinchat_obj.$div.addClass(r)},e),i&&!h&&n&&(joinchat_obj.settings.message_badge?o=setTimeout(function(){joinchat_obj.$(".joinchat__badge").addClass("joinchat__badge--in")},e+n):s&&(o=setTimeout(c,e+n)));a&&!joinchat_obj.is_mobile&&joinchat_obj.$(".joinchat__button").mouseenter(function(){t=setTimeout(c,1500)}).mouseleave(function(){clearTimeout(t)});{function l(){var t=(m.activeElement.type||"").toLowerCase();0<=["date","datetime","email","month","number","password","search","tel","text","textarea","time","url","week"].indexOf(t)?joinchat_obj.chatbox?(joinchat_obj.chatbox_hide(),setTimeout(function(){joinchat_obj.$div.removeClass("joinchat--show")},400)):joinchat_obj.$div.removeClass("joinchat--show"):joinchat_obj.$div.addClass("joinchat--show")}joinchat_obj.$(".joinchat__button").click(function(){a&&!joinchat_obj.chatbox?c():(j(),joinchat_obj.open_whatsapp())}),joinchat_obj.$(".joinchat__close").click(j),joinchat_obj.$(".joinchat__box__scroll").on("mousewheel DOMMouseScroll",function(t){t.preventDefault();t=t.originalEvent.wheelDelta||-t.originalEvent.detail;this.scrollTop+=30*(t<0?1:-1)}),joinchat_obj.is_mobile&&(p(m).on("focus blur","input, textarea",function(t){p(t.target).closest(joinchat_obj.$div).length||(clearTimeout(_),_=setTimeout(l,200))}),p(d).resize(function(){clearTimeout(b),b=setTimeout(function(){joinchat_obj.$div[0].style.setProperty("--vh",window.innerHeight+"px")},200)}).resize())}{var g,u;p(m).on("click",".joinchat_open, .joinchat_app",function(t){t.preventDefault(),p(this).hasClass("joinchat_app")||!a?joinchat_obj.open_whatsapp():joinchat_obj.chatbox||c()}),p(m).on("click",".joinchat_close",function(t){t.preventDefault(),joinchat_obj.chatbox_hide()}),a&&"IntersectionObserver"in d&&0<(g=p(".joinchat_show, .joinchat_force_show")).length&&(u=new IntersectionObserver(function(t){p.each(t,function(){if(0<this.intersectionRatio&&(!h||p(this.target).hasClass("joinchat_force_show")))return c(),u.disconnect(),!1})}),g.each(function(){u.observe(this)}))}p(m).trigger("joinchat:start")}():p(m).on("click",".joinchat_open, .joinchat_app",function(t){t.preventDefault(),joinchat_obj.open_whatsapp()})),joinchat_obj.store.setItem("joinchat_views",parseInt(joinchat_obj.store.getItem("joinchat_views")||0)+1)})}(jQuery,window,document);
1
+ !function(u,d,m){"use strict";d.joinchat_obj=d.joinchat_obj||{},joinchat_obj=u.extend({$div:null,settings:null,store:null,chatbox:!1,is_mobile:!1},joinchat_obj),joinchat_obj.$=function(t){return u(t||this.$div,this.$div)},joinchat_obj.send_event=function(o,e){o=o||"",e=e||"click";var t=d[this.settings.ga_tracker]||d.ga||d.__gaTracker;"function"==typeof t&&"function"==typeof t.getAll?(t("set","transport","beacon"),t.getAll().forEach(function(t){t.send("event","JoinChat",e,o)})):"function"==typeof gtag&&gtag("event",e,{event_category:"JoinChat",event_label:o,transport_type:"beacon"}),"object"==typeof dataLayer&&dataLayer.push({event:"JoinChat",eventAction:e,eventLabel:o}),"function"==typeof fbq&&fbq("trackCustom","JoinChat",{eventAction:e,eventLabel:o})},joinchat_obj.whatsapp_link=function(t,o,e){return((e=void 0!==e?e:this.settings.whatsapp_web&&!this.is_mobile)?"https://web.whatsapp.com/send":"https://api.whatsapp.com/send")+"?phone="+encodeURIComponent(t)+"&text="+encodeURIComponent(o||"")},joinchat_obj.chatbox_show=function(){this.chatbox||(this.chatbox=!0,this.$div.addClass("joinchat--chatbox"),this.settings.message_badge&&this.$(".joinchat__badge").hasClass("joinchat__badge--in")&&this.$(".joinchat__badge").toggleClass("joinchat__badge--in joinchat__badge--out"),u(m).trigger("joinchat:show"))},joinchat_obj.chatbox_hide=function(){this.chatbox&&(this.chatbox=!1,this.$div.removeClass("joinchat--chatbox joinchat--tooltip"),this.settings.message_badge&&this.$(".joinchat__badge").removeClass("joinchat__badge--out"),u(m).trigger("joinchat:hide"))},joinchat_obj.save_hash=function(){var t=this.settings.message_hash||"none",o=(this.store.getItem("joinchat_hashes")||"").split(",").filter(Boolean);-1===o.indexOf(t)&&(o.push(t),this.store.setItem("joinchat_hashes",o.join(",")))},joinchat_obj.open_whatsapp=function(t,o){t={link:this.whatsapp_link(t||this.settings.telephone,o||this.settings.message_send)},o=new RegExp("^https?://(wa.me|(api|web|chat).whatsapp.com|"+location.hostname.replace(".",".")+")/.*","i");u(m).trigger("joinchat:open",[t,this.settings]),o.test(t.link)?(this.send_event(t.link),d.open(t.link,"joinchat","noopener")):console.error("Join.chat: the link doesn't seem safe, it must point to the current domain or whatsapp.com")},u(function(){joinchat_obj.$div=u(".joinchat"),joinchat_obj.settings=joinchat_obj.$div.data("settings"),joinchat_obj.is_mobile=!!navigator.userAgent.match(/Android|iPhone|BlackBerry|IEMobile|Opera Mini/i);try{localStorage.setItem("test",1),localStorage.removeItem("test"),joinchat_obj.store=localStorage}catch(t){joinchat_obj.store={_data:{},setItem:function(t,o){this._data[t]=String(o)},getItem:function(t){return this._data.hasOwnProperty(t)?this._data[t]:null}}}if(void 0===joinchat_obj.settings)try{joinchat_obj.settings=JSON.parse(joinchat_obj.$div.attr("data-settings"))}catch(t){joinchat_obj.settings=void 0}joinchat_obj.$div.length&&joinchat_obj.settings&&joinchat_obj.settings.telephone&&(joinchat_obj.is_mobile||!joinchat_obj.settings.mobile_only?function(){u(m).trigger("joinchat:starting");var t,o,e=1e3*joinchat_obj.settings.button_delay,n=1e3*joinchat_obj.settings.message_delay,i=!!joinchat_obj.settings.message_hash,a=!!joinchat_obj.$(".joinchat__box").length,s=parseInt(joinchat_obj.store.getItem("joinchat_views")||1)>=joinchat_obj.settings.message_views,h=-1!==(joinchat_obj.store.getItem("joinchat_hashes")||"").split(",").filter(Boolean).indexOf(joinchat_obj.settings.message_hash||"none");function c(){clearTimeout(o),joinchat_obj.chatbox_show()}function j(){joinchat_obj.save_hash(),joinchat_obj.chatbox_hide()}var _,r,b="joinchat--show";h||i&&n&&!joinchat_obj.settings.message_badge&&s||(b+=" joinchat--tooltip");setTimeout(function(){joinchat_obj.$div.addClass(b)},e),i&&!h&&n&&(joinchat_obj.settings.message_badge?o=setTimeout(function(){joinchat_obj.$(".joinchat__badge").addClass("joinchat__badge--in")},e+n):s&&(o=setTimeout(c,e+n)));a&&!joinchat_obj.is_mobile&&joinchat_obj.$(".joinchat__button").mouseenter(function(){t=setTimeout(c,1500)}).mouseleave(function(){clearTimeout(t)});{function l(){var t=(m.activeElement.type||"").toLowerCase();0<=["date","datetime","email","month","number","password","search","tel","text","textarea","time","url","week"].indexOf(t)?joinchat_obj.chatbox?(joinchat_obj.chatbox_hide(),setTimeout(function(){joinchat_obj.$div.removeClass("joinchat--show")},400)):joinchat_obj.$div.removeClass("joinchat--show"):joinchat_obj.$div.addClass("joinchat--show")}joinchat_obj.$(".joinchat__button").click(function(){a&&!joinchat_obj.chatbox?c():(j(),joinchat_obj.open_whatsapp())}),joinchat_obj.$(".joinchat__close").click(j),joinchat_obj.$(".joinchat__box__scroll").on("mousewheel DOMMouseScroll",function(t){t.preventDefault();t=t.originalEvent.wheelDelta||-t.originalEvent.detail;this.scrollTop+=30*(t<0?1:-1)}),joinchat_obj.is_mobile&&(u(m).on("focus blur","input, textarea",function(t){u(t.target).closest(joinchat_obj.$div).length||(clearTimeout(_),_=setTimeout(l,200))}),u(d).resize(function(){clearTimeout(r),r=setTimeout(function(){joinchat_obj.$div[0].style.setProperty("--vh",window.innerHeight+"px")},200)}).resize())}{var g,p;u(m).on("click",'.joinchat_open, .joinchat_app, a[href="#joinchat"], a[href="#whatsapp"]',function(t){t.preventDefault(),!a||u(this).is('.joinchat_app, a[href="#whatsapp"]')?joinchat_obj.open_whatsapp():c()}),u(m).on("click",".joinchat_close",function(t){t.preventDefault(),joinchat_obj.chatbox_hide()}),a&&"IntersectionObserver"in d&&0<(g=u(".joinchat_show, .joinchat_force_show")).length&&(p=new IntersectionObserver(function(t){u.each(t,function(){if(0<this.intersectionRatio&&(!h||u(this.target).hasClass("joinchat_force_show")))return c(),p.disconnect(),!1})}),g.each(function(){p.observe(this)}))}u(m).trigger("joinchat:start")}():u(m).on("click",'.joinchat_open, .joinchat_app, a[href="#joinchat"], a[href="#whatsapp"]',function(t){t.preventDefault(),joinchat_obj.open_whatsapp()})),joinchat_obj.store.setItem("joinchat_views",parseInt(joinchat_obj.store.getItem("joinchat_views")||0)+1)})}(jQuery,window,document);
public/partials/html.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Join.chat public html template
5
+ *
6
+ * @since 4.1.5
7
+ * @package JoinChat
8
+ * @subpackage JoinChat/public
9
+ * @author Creame <hola@crea.me>
10
+ */
11
+
12
+ defined( 'WPINC' ) || exit;
13
+ ?>
14
+ <div class="joinchat <?php echo apply_filters( 'joinchat_classes', $joinchat_classes ); ?>" data-settings='<?php echo JoinChatUtil::to_json( $data ); ?>'>
15
+ <div class="joinchat__button">
16
+ <div class="joinchat__button__open"></div>
17
+ <?php if ( $image ) : ?>
18
+ <div class="joinchat__button__image"><?php echo $image; ?></div>
19
+ <?php endif; ?>
20
+ <?php if ( $this->settings['message_start'] ) : ?>
21
+ <div class="joinchat__button__sendtext"><?php echo $this->settings['message_start']; ?></div>
22
+ <?php endif; ?>
23
+ <?php if ( $box_content ) : ?>
24
+ <svg class="joinchat__button__send" viewbox="0 0 400 400" stroke-linecap="round" stroke-width="33">
25
+ <path class="joinchat_svg__plain" d="M168.83 200.504H79.218L33.04 44.284a1 1 0 0 1 1.386-1.188L365.083 199.04a1 1 0 0 1 .003 1.808L34.432 357.903a1 1 0 0 1-1.388-1.187l29.42-99.427"/>
26
+ <path class="joinchat_svg__chat" d="M318.087 318.087c-52.982 52.982-132.708 62.922-195.725 29.82l-80.449 10.18 10.358-80.112C18.956 214.905 28.836 134.99 81.913 81.913c65.218-65.217 170.956-65.217 236.174 0 42.661 42.661 57.416 102.661 44.265 157.316"/>
27
+ </svg>
28
+ <?php endif; ?>
29
+ <?php if ( $this->settings['message_badge'] ) : ?>
30
+ <div class="joinchat__badge">1</div>
31
+ <?php endif; ?>
32
+ <?php if ( $this->settings['button_tip'] ) : ?>
33
+ <div class="joinchat__tooltip"><div><?php echo $this->settings['button_tip']; ?></div></div>
34
+ <?php endif; ?>
35
+ </div>
36
+ <?php if ( $box_content ) : ?>
37
+ <div class="joinchat__box">
38
+ <div class="joinchat__header">
39
+ <?php if ( '__jc__' === $this->settings['header'] ) : ?>
40
+ <a class="joinchat__powered" href="<?php echo $powered_link; ?>" rel="nofollow noopener" target="_blank">
41
+ <?php _e( 'Powered by', 'creame-whatsapp-me' ); ?> <svg viewbox="0 0 1424 318"><title>Join.chat</title><path d="M171 7c1.3 0 3.2.6 5.5 1.8 2.3 1.1 3.5 2.3 3.5 3.4v1.2l-.3 3.6-.5 8a947.3 947.3 0 00-2 56v37.2l.2 15.9.2 23.7c.2 12.3.2 22.8.2 31.4 0 22-5.8 42.8-17.4 62.5-11.6 19.7-27.9 35.7-48.7 48S68 318 43.3 318c-14 0-24.6-2.7-32-8.2A27 27 0 010 286.6a27 27 0 017-18.7c4.7-5.2 11-7.8 18.8-7.8 6.9 0 13.1 2 18.7 6 5.4 3.8 9.7 7.9 12.8 12.4l.3.5A96.8 96.8 0 0068 291.9c3.7 4 7.2 5.9 10.3 5.9 4 0 7.1-2 9.6-6s4.5-11.8 6.2-23.3v-.6a363 363 0 002.5-47.5V104.2l.1-.1V76.3c0-1.6-.2-2.6-.6-3V73c-.5-.4-1.4-.8-3-1.2l-.5-.2-11.9-2c-1.9-.3-2.8-2.5-2.8-6.7 0-3.8 1-6 2.8-6.7 27-10.5 56.2-26.6 87.5-48.3a6 6 0 012.8-1zm1205 43c3.9 0 6 .8 6.1 2.5 1.3 9.6 2.1 21.8 2.5 36.6h.5a1888.3 1888.3 0 0033.7-.3h.8c1.7 0 2.8.7 3.4 2s1 4 1 8-.3 6.6-1 7.7c-.6 1.2-1.7 1.8-3.4 1.8h-1.9c-15.1 0-26-.2-32.8-.4v62c0 13.8 1.7 23.3 5.1 28.5 3.4 5.3 8.8 7.9 16 7.9 1.4 0 3-.3 4.6-1 1.7-.6 2.7-.9 3.1-.9 1.9 0 3.8 1 5.6 3 1.9 2 2.5 3.7 1.9 5.1a62.9 62.9 0 01-22 27.8 59.2 59.2 0 01-36.3 11.7c-16.1 0-28.4-4.9-36.9-14.6-3.3-3.8-6-8.1-8-13l-.4.4-.6.5c-17.4 17.1-33 25.7-46.7 25.7-18.7 0-31.7-13-39.2-39.2-5 12.3-12 22-21 28.9a49.2 49.2 0 01-30.7 10.3 37.6 37.6 0 01-29-12.5 44 44 0 01-11.4-30.7c0-9.5 1.6-17.2 5-23a41 41 0 0117-15.3c13.2-7 35.4-13.8 66.6-20.8l1-.2V138c0-10.8-1.7-19.3-5-25.5-3.3-6.4-7.9-9.6-13.7-9.6-2.8 0-4.4 1.6-5 4.7v.3l-2.1 14.8-.1.6a38.4 38.4 0 01-11.1 24c-6 5.4-13.5 8.1-22.4 8.1-5.2 0-9.6-1.5-13.1-4.6a16 16 0 01-5.3-12.7c0-10.7 8.8-21.7 26.3-33s37.5-17 60-17c41 0 61.7 15.2 62.1 45.7V192c0 4.6.3 8.4.7 11.4.4 3 1 5.4 1.7 7 .7 1.7 1.7 2.7 2.8 3.1 1.1.5 2.3.5 3.6 0a21 21 0 004.6-2.4l1.7-1c-.7-4-1-8.4-1-13v-85.8c0-1.5-.2-2.4-.6-2.8-.4-.5-1.4-.9-3-1.3l-11.2-1.6c-1.7-.2-2.5-2.3-2.5-6.2 0-4.4.8-6.7 2.5-7 15.9-3.7 29-8.6 39.3-14.6a144 144 0 0031-25.4c1.7-1.7 4-2.5 7.1-2.5zM290 88c27.5 0 49.7 7.2 66.6 21.6a73.1 73.1 0 0125.3 58.7c0 25.7-9 46-27 60.6S313.3 251 283.9 251c-27.5 0-49.7-7.2-66.6-21.6a73.1 73.1 0 01-25.3-58.7c0-25.7 9-46 27-60.6S260.8 88 290.1 88zm588.2 0c18.5 0 33.4 4.1 44.5 12.3 11.2 8.3 16.7 17.9 16.7 28.8 0 6.1-2.1 11.2-6.5 15.2s-9.9 6-16.7 6c-13 0-24-8.5-33-25.6-5.6-10.5-10-17.3-13-20.5s-6.1-4.8-9.7-4.8c-7.4 0-11 5.5-11 16.4 0 13.6 3 28.2 9.2 44a108 108 0 0023.2 37.5c8 8 16.5 12 25.4 12 7.6 0 15.3-3.3 23.2-9.9 1.4-1 3.5-.6 6.1 1.3 2.7 1.8 3.8 3.6 3.1 5.2a70.1 70.1 0 01-28.7 31.8 89 89 0 01-48.6 13.3 77.6 77.6 0 01-57.2-22.2 78.4 78.4 0 01-22.3-58c0-24.6 9-44.5 27-59.8 17.9-15.3 40.6-23 68.3-23zm-402.4-2.8c1.2 0 2.9.5 5 1.6 2 1 3 2 3 3.1l-.6 9.7a784.6 784.6 0 00-1.9 53.2v76.5c.1 2.2 1.3 3.6 3.5 4l.2.1 10.5 2.2.5.1h.4l10.5-2.2h.3c2.3-.5 3.4-2 3.4-4.4v-81.9c0-1.3-.2-2.1-.6-2.5-.4-.4-1.4-.8-3-1.3l-10.6-1.8h-.2c-1.5-.4-2.3-2.3-2.3-6 0-3.2.8-5.2 2.5-5.8a364 364 0 0074.3-42.9c.9-.6 1.7-.9 2.5-.9 1.3 0 3 .5 5 1.6s3 2 3 3v.1c0 .8-.1 4.9-.5 12a392.8 392.8 0 00-.7 21.8 64.5 64.5 0 0121.6-26 56.2 56.2 0 0134-10.6c16.2 0 29 4.6 38.5 14a52.6 52.6 0 0114 39v88.5c.2 2.3 1.4 3.7 3.8 4l10.5 2.3h.2c1.5.3 2.3 2.6 2.3 6.8 0 4.3-.8 6.5-2.5 6.5l-19-1c-11.7-.8-22-1.2-30.9-1.2s-18.8.4-29.9 1.1l-18 1.1c-1.7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2h.1c1.6.7 2.4 3 2.4 6.7 0 4.3-.9 6.5-2.5 6.5l-18-1a459 459 0 00-60.7 0l-19.2 1c-1.7 0-2.5-2.2-2.5-6.5s.8-6.5 2.5-6.7l10.5-2.2h.3c2.3-.5 3.4-2 3.4-4.3V70.6c0-1.3-.2-2-.6-2.5-.4-.4-1.4-.8-3-1.2l-10.6-1.8h-.2c-1.5-.4-2.3-2.3-2.3-5.9 0-3.3.8-5.2 2.5-5.8 24-9.3 49.9-23.4 77.8-42.5 1-.6 1.8-.9 2.4-.9zm-743 90c-7.6 0-11.4 6.7-11.4 20.3 0 16.6 3.7 38.3 11.2 65.2 7.4 26.9 14.5 43.7 21.1 50.3 3.1 3 6.3 4.6 9.7 4.6 7.6 0 11.5-6.8 11.5-20.4 0-16.5-3.8-38.2-11.2-65.2-7.5-26.9-14.5-43.6-21.2-50.2-3.1-3.1-6.3-4.7-9.6-4.7zm939.2 64.9c-6 0-9.1 4.3-9.1 12.8 0 8.4 2.4 15.9 7 22.4 4.8 6.6 10 9.8 15.4 9.8 2.2 0 4-.6 5.4-2l.3-.1v-22.3a20.6 20.6 0 00-6.7-14.8c-4-3.9-8-5.8-12.3-5.8zM450.6 0a34 34 0 0125.5 10.3c6.7 6.9 10 15.4 10 25.7a35 35 0 01-35.5 36 34 34 0 01-25.5-10.4 35.3 35.3 0 01-10-25.6c0-10.3 3.3-18.8 10-25.7A34 34 0 01450.6 0zM748 249a31 31 0 0022-8.2c6-5.5 9-12.2 9-20.3s-3-14.8-8.9-20.3-13.2-8.2-22-8.2-16.3 2.7-22.2 8.2-8.9 12.2-8.9 20.3 3 14.8 8.9 20.3 13.3 8.2 22.1 8.2z"/></svg>
42
+ </a>
43
+ <?php elseif ( '__wa__' === $this->settings['header'] ) : ?>
44
+ <svg class="joinchat__wa" viewBox="0 0 120 28"><title>WhatsApp</title><path d="M117.2 17c0 .4-.2.7-.4 1-.1.3-.4.5-.7.7l-1 .2c-.5 0-.9 0-1.2-.2l-.7-.7a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.4 1.8v5.5h2.7v-6c0-.6 0-1.2-.2-1.6 0-.5-.3-1-.5-1.3zm-14 4.7l-2.3-9.2h-2.8l-2.3 9-2.2-9h-3l3.6 13.4h3l2.2-9.2 2.3 9.2h3l3.6-13.4h-3l-2.1 9.2zm-24.5.2L18 15.6c-.3-.1-.6-.2-.8.2A20 20 0 0 1 16 17c-.2.2-.4.3-.7.1-.4-.2-1.5-.5-2.8-1.7-1-1-1.7-2-2-2.4-.1-.4 0-.5.2-.7l.5-.6.4-.6v-.6L10.4 8c-.3-.6-.6-.5-.8-.6H9c-.2 0-.6.1-.9.5C7.8 8.2 7 9 7 10.7c0 1.7 1.3 3.4 1.4 3.6.2.3 2.5 3.7 6 5.2l1.9.8c.8.2 1.6.2 2.2.1.6-.1 2-.8 2.3-1.6.3-.9.3-1.5.2-1.7l-.7-.4zM14 25.3c-2 0-4-.5-5.8-1.6l-.4-.2-4.4 1.1 1.2-4.2-.3-.5A11.5 11.5 0 0 1 22.1 5.7 11.5 11.5 0 0 1 14 25.3zM14 0A13.8 13.8 0 0 0 2 20.7L0 28l7.3-2A13.8 13.8 0 1 0 14 0z"/></svg>
45
+ <?php elseif ( '' !== $this->settings['header'] ) : ?>
46
+ <span class="joinchat__header__text"><?php echo $this->settings['header']; ?></span>
47
+ <?php endif; ?>
48
+ <div class="joinchat__close" aria-label="<?php _e( 'Close', 'creame-whatsapp-me' ); ?>"></div>
49
+ </div>
50
+ <div class="joinchat__box__scroll">
51
+ <div class="joinchat__box__content">
52
+ <?php echo $box_content; ?>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ <?php endif; ?>
57
+ <svg height="0" width="0"><defs><clipPath id="joinchat__message__peak"><path d="M17 25V0C17 12.877 6.082 14.9 1.031 15.91c-1.559.31-1.179 2.272.004 2.272C9.609 18.182 17 18.088 17 25z"/></clipPath></defs></svg>
58
+ </div>
public/partials/script.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Join.chat public fallback script template
5
+ *
6
+ * @since 4.1.5
7
+ * @package JoinChat
8
+ * @subpackage JoinChat/public
9
+ * @author Creame <hola@crea.me>
10
+ */
11
+
12
+ defined( 'WPINC' ) || exit;
13
+ ?>
14
+ <script>
15
+ jQuery(function($){
16
+ var arg = <?php echo JoinChatUtil::to_json( $args ); ?>;
17
+ var via = arg.web && !navigator.userAgent.match(/Android|iPhone|BlackBerry|IEMobile|Opera Mini/i) ? 'web' : 'api';
18
+ $(document).on('click', '.joinchat_open,.joinchat_app,a[href="#whatsapp"],a[href="#joinchat"]', function(e){
19
+ e.preventDefault();
20
+ window.open('https://' + via + '.whatsapp.com/send?phone=' + encodeURIComponent(arg.tel) + '&text=' + encodeURIComponent(arg.msg), null, 'noopener');
21
+ });
22
+ });
23
+ </script>