WhatsApp me - Version 4.0.6

Version Description

Join.chat rebrand!! Analytics events change from WhatsAppMe to JoinChat and classes, actions and filters change from wame or whatsappme to joinchat.

Download this release

Release Info

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

Code changes from version 4.0.5 to 4.0.6

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.4
7
  Requires PHP: 5.3
8
- Stable tag: 4.0.5
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -181,6 +181,9 @@ Join.chat general text settings can be translated with the strings translation o
181
 
182
  == Changelog ==
183
 
 
 
 
184
  = 4.0.5 =
185
  * **NEW:** Clear third party cache plugins on settings save.
186
  * FIX php error on image resize.
@@ -214,7 +217,7 @@ See [changelog.txt](https://plugins.svn.wordpress.org/creame-whatsapp-me/trunk/c
214
 
215
  == Upgrade Notice ==
216
 
217
- = 4.0.5 =
218
  **Join.chat rebrand!!** Analytics events change from `WhatsAppMe` to `JoinChat` and classes, actions and filters change from `wame` or `whatsappme` to `joinchat`.
219
 
220
  = 2.3.0 =
5
  Requires at least: 3.0.1
6
  Tested up to: 5.4
7
  Requires PHP: 5.3
8
+ Stable tag: 4.0.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
181
 
182
  == Changelog ==
183
 
184
+ = 4.0.6 =
185
+ * Minor changes: better encode emoji detection, check WooCommerce version, css fixes and improvements
186
+
187
  = 4.0.5 =
188
  * **NEW:** Clear third party cache plugins on settings save.
189
  * FIX php error on image resize.
217
 
218
  == Upgrade Notice ==
219
 
220
+ = 4.0.6 =
221
  **Join.chat rebrand!!** Analytics events change from `WhatsAppMe` to `JoinChat` and classes, actions and filters change from `wame` or `whatsappme` to `joinchat`.
222
 
223
  = 2.3.0 =
admin/class-joinchat-admin.php CHANGED
@@ -125,7 +125,8 @@ class JoinChatAdmin {
125
  apply_filters( 'joinchat_extra_settings', array() )
126
  );
127
 
128
- $saved_settings = get_option( 'joinchat' );
 
129
 
130
  if ( is_array( $saved_settings ) ) {
131
  // clean unused saved settings
@@ -136,8 +137,6 @@ class JoinChatAdmin {
136
  if ( $this->settings['message_delay'] > 120 ) {
137
  $this->settings['message_delay'] = round( $this->settings['message_delay'] / 1000 );
138
  }
139
- } else {
140
- $this->settings = $default_settings;
141
  }
142
 
143
  }
@@ -242,16 +241,16 @@ class JoinChatAdmin {
242
  'button' => array(
243
  'telephone' => '<label for="joinchat_phone">' . __( 'Telephone', 'creame-whatsapp-me' ) . '</label>',
244
  'message_send' => '<label for="joinchat_message_send">' . __( 'Message', 'creame-whatsapp-me' ) . '</label>' . self::vars_help( 'message_send' ),
245
- 'position' => __( 'Position on Screen', 'creame-whatsapp-me' ),
246
  'button_image' => __( 'Image', 'creame-whatsapp-me' ),
247
  'button_tip' => '<label for="joinchat_button_tip">' . __( 'Tooltip', 'creame-whatsapp-me' ) . '</label>',
 
248
  'button_delay' => '<label for="joinchat_button_delay">' . __( 'Button Delay', 'creame-whatsapp-me' ) . '</label>',
249
  'mobile_only' => __( 'Mobile Only', 'creame-whatsapp-me' ),
250
  'whatsapp_web' => __( 'WhatsApp Web', 'creame-whatsapp-me' ),
251
  ),
252
  'chat' => array(
253
  'message_text' => '<label for="joinchat_message_text">' . __( 'Call to Action', 'creame-whatsapp-me' ) . '</label>' . self::vars_help( 'message_text' ),
254
- 'message_start' => '<label for="joinchat_message_start">' . __( 'Start WhatsApp Button', 'creame-whatsapp-me' ) . '</label>',
255
  'color' => __( 'Theme Color', 'creame-whatsapp-me' ),
256
  'dark_mode' => __( 'Dark Mode', 'creame-whatsapp-me' ),
257
  'remove_brand' => __( 'Logo', 'creame-whatsapp-me' ),
@@ -343,7 +342,9 @@ class JoinChatAdmin {
343
  }
344
 
345
  // Encode emojis if utf8mb4 not supported by DB
346
- if ( 'utf8mb4' !== $wpdb->charset && function_exists( 'wp_encode_emoji' ) && ! has_filter( 'sanitize_text_field', 'wp_encode_emoji' ) ) {
 
 
347
  add_filter( 'sanitize_text_field', 'wp_encode_emoji' );
348
  }
349
 
@@ -531,7 +532,7 @@ class JoinChatAdmin {
531
  break;
532
 
533
  case 'button_image':
534
- $thumb = intval( $value ) > 0 ? JoinChatUtil::thumb( $value, 116, 116 ) : false;
535
  $image = is_array( $thumb ) ? $thumb['url'] : false;
536
 
537
  $output = '<div id="joinchat_button_image_wrapper">' .
@@ -540,17 +541,21 @@ class JoinChatAdmin {
540
  '<input id="joinchat_button_image_add" type="button" value="' . esc_attr__( 'Select an image', 'creame-whatsapp-me' ) . '" class="button-primary" ' .
541
  'data-title="' . esc_attr__( 'Select button image', 'creame-whatsapp-me' ) . '" data-button="' . esc_attr__( 'Use image', 'creame-whatsapp-me' ) . '"> ' .
542
  '<input id="joinchat_button_image_remove" type="button" value="' . esc_attr__( 'Remove', 'creame-whatsapp-me' ) . '" class="button-secondary' . ( $image ? '' : ' joinchat-hidden' ) . '">' .
543
- '<p class="description">' . __( 'The image will alternate with WhatsApp logo', 'creame-whatsapp-me' ) . '</p></div>';
 
 
 
 
544
  break;
545
 
546
  case 'button_tip':
547
  $output = '<input id="joinchat_button_tip" name="joinchat[button_tip]" value="' . $value . '" type="text" maxlength="40" class="regular-text" placeholder="' . esc_attr__( '💬 Need help?', 'creame-whatsapp-me' ) . '"> ' .
548
- '<p class="description">' . __( 'Short text shown next to WhatsApp button', 'creame-whatsapp-me' ) . '</p>';
549
  break;
550
 
551
  case 'button_delay':
552
  $output = '<input id="joinchat_button_delay" name="joinchat[button_delay]" value="' . $value . '" type="number" min="0" max="120" style="width:5em"> ' . __( 'seconds', 'creame-whatsapp-me' ) .
553
- '<p class="description">' . __( 'Time since the page is opened until the WhatsApp button is displayed', 'creame-whatsapp-me' ) . '</p>';
554
  break;
555
 
556
  case 'whatsapp_web':
@@ -575,7 +580,7 @@ class JoinChatAdmin {
575
 
576
  case 'message_start':
577
  $output = '<input id="joinchat_message_start" name="joinchat[message_start]" value="' . $value . '" type="text" maxlength="20" class="regular-text" placeholder="' . esc_attr__( 'Open chat', 'creame-whatsapp-me' ) . '"> ' .
578
- '<p class="description">' . __( 'Text of the start WhatsApp button on Chat Window', 'creame-whatsapp-me' ) . '</p>';
579
  break;
580
 
581
  case 'message_delay':
@@ -960,7 +965,9 @@ class JoinChatAdmin {
960
  }
961
 
962
  // Encode emojis if utf8mb4 not supported by DB
963
- if ( 'utf8mb4' !== $wpdb->charset && function_exists( 'wp_encode_emoji' ) && ! has_filter( 'sanitize_text_field', 'wp_encode_emoji' ) ) {
 
 
964
  add_filter( 'sanitize_text_field', 'wp_encode_emoji' );
965
  }
966
 
125
  apply_filters( 'joinchat_extra_settings', array() )
126
  );
127
 
128
+ $this->settings = $default_settings;
129
+ $saved_settings = get_option( 'joinchat', $default_settings );
130
 
131
  if ( is_array( $saved_settings ) ) {
132
  // clean unused saved settings
137
  if ( $this->settings['message_delay'] > 120 ) {
138
  $this->settings['message_delay'] = round( $this->settings['message_delay'] / 1000 );
139
  }
 
 
140
  }
141
 
142
  }
241
  'button' => array(
242
  'telephone' => '<label for="joinchat_phone">' . __( 'Telephone', 'creame-whatsapp-me' ) . '</label>',
243
  'message_send' => '<label for="joinchat_message_send">' . __( 'Message', 'creame-whatsapp-me' ) . '</label>' . self::vars_help( 'message_send' ),
 
244
  'button_image' => __( 'Image', 'creame-whatsapp-me' ),
245
  'button_tip' => '<label for="joinchat_button_tip">' . __( 'Tooltip', 'creame-whatsapp-me' ) . '</label>',
246
+ 'position' => __( 'Position on Screen', 'creame-whatsapp-me' ),
247
  'button_delay' => '<label for="joinchat_button_delay">' . __( 'Button Delay', 'creame-whatsapp-me' ) . '</label>',
248
  'mobile_only' => __( 'Mobile Only', 'creame-whatsapp-me' ),
249
  'whatsapp_web' => __( 'WhatsApp Web', 'creame-whatsapp-me' ),
250
  ),
251
  'chat' => array(
252
  'message_text' => '<label for="joinchat_message_text">' . __( 'Call to Action', 'creame-whatsapp-me' ) . '</label>' . self::vars_help( 'message_text' ),
253
+ 'message_start' => '<label for="joinchat_message_start">' . __( 'Open Chat', 'creame-whatsapp-me' ) . '</label>',
254
  'color' => __( 'Theme Color', 'creame-whatsapp-me' ),
255
  'dark_mode' => __( 'Dark Mode', 'creame-whatsapp-me' ),
256
  'remove_brand' => __( 'Logo', 'creame-whatsapp-me' ),
342
  }
343
 
344
  // Encode emojis if utf8mb4 not supported by DB
345
+ if ( 'utf8mb4' !== $wpdb->get_col_charset( $wpdb->options, 'option_value' )
346
+ && function_exists( 'wp_encode_emoji' )
347
+ && ! has_filter( 'sanitize_text_field', 'wp_encode_emoji' ) ) {
348
  add_filter( 'sanitize_text_field', 'wp_encode_emoji' );
349
  }
350
 
532
  break;
533
 
534
  case 'button_image':
535
+ $thumb = JoinChatUtil::thumb( $value, 116, 116 );
536
  $image = is_array( $thumb ) ? $thumb['url'] : false;
537
 
538
  $output = '<div id="joinchat_button_image_wrapper">' .
541
  '<input id="joinchat_button_image_add" type="button" value="' . esc_attr__( 'Select an image', 'creame-whatsapp-me' ) . '" class="button-primary" ' .
542
  'data-title="' . esc_attr__( 'Select button image', 'creame-whatsapp-me' ) . '" data-button="' . esc_attr__( 'Use image', 'creame-whatsapp-me' ) . '"> ' .
543
  '<input id="joinchat_button_image_remove" type="button" value="' . esc_attr__( 'Remove', 'creame-whatsapp-me' ) . '" class="button-secondary' . ( $image ? '' : ' joinchat-hidden' ) . '">' .
544
+ '<p class="description">' . __( 'The image will alternate with button icon', 'creame-whatsapp-me' ) . '</p></div>' .
545
+ '<p class="joinchat-addon">' . sprintf(
546
+ __( 'Other icons and more channels (Telegram, Messenger…) with %s', 'creame-whatsapp-me' ),
547
+ '<a href="https://join.chat/' . $lang . '/addons/omnichannel/' . $utm . '" target="_blank">\'Omnichannel\'</a>'
548
+ ) . '</p>';
549
  break;
550
 
551
  case 'button_tip':
552
  $output = '<input id="joinchat_button_tip" name="joinchat[button_tip]" value="' . $value . '" type="text" maxlength="40" class="regular-text" placeholder="' . esc_attr__( '💬 Need help?', 'creame-whatsapp-me' ) . '"> ' .
553
+ '<p class="description">' . __( 'Short text shown next to button', 'creame-whatsapp-me' ) . '</p>';
554
  break;
555
 
556
  case 'button_delay':
557
  $output = '<input id="joinchat_button_delay" name="joinchat[button_delay]" value="' . $value . '" type="number" min="0" max="120" style="width:5em"> ' . __( 'seconds', 'creame-whatsapp-me' ) .
558
+ '<p class="description">' . __( 'Time since the page is opened until the button is displayed', 'creame-whatsapp-me' ) . '</p>';
559
  break;
560
 
561
  case 'whatsapp_web':
580
 
581
  case 'message_start':
582
  $output = '<input id="joinchat_message_start" name="joinchat[message_start]" value="' . $value . '" type="text" maxlength="20" class="regular-text" placeholder="' . esc_attr__( 'Open chat', 'creame-whatsapp-me' ) . '"> ' .
583
+ '<p class="description">' . __( 'Text to open chat on Chat Window button', 'creame-whatsapp-me' ) . '</p>';
584
  break;
585
 
586
  case 'message_delay':
965
  }
966
 
967
  // Encode emojis if utf8mb4 not supported by DB
968
+ if ( 'utf8mb4' !== $wpdb->get_col_charset( $wpdb->postmeta, 'meta_value' )
969
+ && function_exists( 'wp_encode_emoji' )
970
+ && ! has_filter( 'sanitize_text_field', 'wp_encode_emoji' ) ) {
971
  add_filter( 'sanitize_text_field', 'wp_encode_emoji' );
972
  }
973
 
includes/class-joinchat-integrations.php CHANGED
@@ -18,7 +18,7 @@ class JoinChatIntegrations {
18
  public function load_integrations() {
19
 
20
  // Integration with WooCommerce
21
- if ( class_exists( 'WooCommerce' ) ) {
22
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-joinchat-wooadmin.php';
23
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-joinchat-woopublic.php';
24
 
18
  public function load_integrations() {
19
 
20
  // Integration with WooCommerce
21
+ if ( class_exists( 'WooCommerce' ) && version_compare( WC_VERSION, '3.0', '>=' ) ) {
22
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-joinchat-wooadmin.php';
23
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-joinchat-woopublic.php';
24
 
includes/class-joinchat-util.php CHANGED
@@ -86,7 +86,7 @@ class JoinChatUtil {
86
 
87
  $img_path = intval( $img ) > 0 ? get_attached_file( $img ) : $img;
88
 
89
- if ( ! file_exists( $img_path ) ) {
90
  return false;
91
  }
92
 
@@ -141,7 +141,7 @@ class JoinChatUtil {
141
  public static function is_animated_gif( $img ) {
142
  $img_path = intval( $img ) > 0 ? get_attached_file( $img ) : $img;
143
 
144
- return file_exists( $img_path ) ? (bool) preg_match( '#(\x00\x21\xF9\x04.{4}\x00\x2C.*){2,}#s', file_get_contents( $img_path ) ) : false;
145
  }
146
 
147
  /**
86
 
87
  $img_path = intval( $img ) > 0 ? get_attached_file( $img ) : $img;
88
 
89
+ if ( ! $img_path || ! file_exists( $img_path ) ) {
90
  return false;
91
  }
92
 
141
  public static function is_animated_gif( $img ) {
142
  $img_path = intval( $img ) > 0 ? get_attached_file( $img ) : $img;
143
 
144
+ return $img_path && file_exists( $img_path ) ? (bool) preg_match( '#(\x00\x21\xF9\x04.{4}\x00\x2C.*){2,}#s', file_get_contents( $img_path ) ) : false;
145
  }
146
 
147
  /**
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.0.5
13
  * Author: Creame
14
  * Author URI: https://crea.me
15
  * License: GPL-2.0+
@@ -27,7 +27,7 @@ if ( ! defined( 'WPINC' ) ) {
27
  * Currently plugin version.
28
  * Start at version 1.0.0 and use SemVer - https://semver.org
29
  */
30
- define( 'JOINCHAT_VERSION', '4.0.5' );
31
 
32
  /**
33
  * 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.0.6
13
  * Author: Creame
14
  * Author URI: https://crea.me
15
  * License: GPL-2.0+
27
  * Currently plugin version.
28
  * Start at version 1.0.0 and use SemVer - https://semver.org
29
  */
30
+ define( 'JOINCHAT_VERSION', '4.0.6' );
31
 
32
  /**
33
  * 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-05-07 09: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"
@@ -22,11 +22,17 @@ msgstr ""
22
  "Language: "
23
 
24
  #: public/class-joinchat-public.php:103 admin/class-joinchat-admin.php:119
25
- #: admin/class-joinchat-admin.php:569
26
  msgid "Open chat"
27
  msgstr ""
28
 
29
- #: public/class-joinchat-public.php:316
 
 
 
 
 
 
30
  msgid "Close"
31
  msgstr ""
32
 
@@ -38,324 +44,324 @@ msgstr ""
38
  msgid "Visibility"
39
  msgstr ""
40
 
41
- #: admin/class-joinchat-admin.php:243 admin/class-joinchat-admin.php:901
42
  msgid "Telephone"
43
  msgstr ""
44
 
45
- #: admin/class-joinchat-admin.php:244 admin/class-joinchat-admin.php:909
46
  msgid "Message"
47
  msgstr ""
48
 
49
- #: admin/class-joinchat-admin.php:245 admin/class-joinchat-admin.php:518
50
- msgid "Position on Screen"
51
- msgstr ""
52
-
53
- #: admin/class-joinchat-admin.php:246
54
  msgid "Image"
55
  msgstr ""
56
 
57
- #: admin/class-joinchat-admin.php:247
58
  msgid "Tooltip"
59
  msgstr ""
60
 
61
- #: admin/class-joinchat-admin.php:248
 
 
 
 
62
  msgid "Button Delay"
63
  msgstr ""
64
 
65
- #: admin/class-joinchat-admin.php:249 admin/class-joinchat-admin.php:512
66
  msgid "Mobile Only"
67
  msgstr ""
68
 
69
- #: admin/class-joinchat-admin.php:250 admin/class-joinchat-admin.php:549
70
  msgid "WhatsApp Web"
71
  msgstr ""
72
 
73
- #: admin/class-joinchat-admin.php:253 admin/class-joinchat-admin.php:905
74
  msgid "Call to Action"
75
  msgstr ""
76
 
77
- #: admin/class-joinchat-admin.php:254
78
- msgid "Start WhatsApp Button"
79
  msgstr ""
80
 
81
- #: admin/class-joinchat-admin.php:255
82
  msgid "Theme Color"
83
  msgstr ""
84
 
85
- #: admin/class-joinchat-admin.php:256 admin/class-joinchat-admin.php:594
86
  msgid "Dark Mode"
87
  msgstr ""
88
 
89
- #: admin/class-joinchat-admin.php:257 admin/class-joinchat-admin.php:604
90
  msgid "Logo"
91
  msgstr ""
92
 
93
- #: admin/class-joinchat-admin.php:260
94
  msgid "Chat Delay"
95
  msgstr ""
96
 
97
- #: admin/class-joinchat-admin.php:261
98
  msgid "Page Views"
99
  msgstr ""
100
 
101
- #: admin/class-joinchat-admin.php:262 admin/class-joinchat-admin.php:584
102
  msgid "Notification Balloon"
103
  msgstr ""
104
 
105
- #: admin/class-joinchat-admin.php:271
106
  msgid "Global"
107
  msgstr ""
108
 
109
- #: admin/class-joinchat-admin.php:276
110
  msgid "Front Page"
111
  msgstr ""
112
 
113
- #: admin/class-joinchat-admin.php:277
114
  msgid "Blog Page"
115
  msgstr ""
116
 
117
- #: admin/class-joinchat-admin.php:278
118
  msgid "404 Page"
119
  msgstr ""
120
 
121
- #: admin/class-joinchat-admin.php:279
122
  msgid "Search Results"
123
  msgstr ""
124
 
125
- #: admin/class-joinchat-admin.php:280
126
  msgid "Archives"
127
  msgstr ""
128
 
129
- #: admin/class-joinchat-admin.php:281
130
  msgid "Date Archives"
131
  msgstr ""
132
 
133
- #: admin/class-joinchat-admin.php:282
134
  msgid "Author Archives"
135
  msgstr ""
136
 
137
- #: admin/class-joinchat-admin.php:283
138
  msgid "Singular"
139
  msgstr ""
140
 
141
- #: admin/class-joinchat-admin.php:284
142
  msgid "Page"
143
  msgstr ""
144
 
145
- #: admin/class-joinchat-admin.php:285
146
  msgid "Post"
147
  msgstr ""
148
 
149
- #: admin/class-joinchat-admin.php:386
150
  msgid "Settings saved"
151
  msgstr ""
152
 
153
- #: admin/class-joinchat-admin.php:433
154
  msgid "Button"
155
  msgstr ""
156
 
157
- #: admin/class-joinchat-admin.php:434
158
  msgid ""
159
  "Set the contact number and where you want the WhatsApp button to be "
160
  "displayed."
161
  msgstr ""
162
 
163
- #: admin/class-joinchat-admin.php:438
164
  msgid "Chat Window"
165
  msgstr ""
166
 
167
- #: admin/class-joinchat-admin.php:440
168
  msgid ""
169
  "If you define a \"Call to Action\" a window will be displayed simulating a "
170
  "chat before launching WhatsApp."
171
  msgstr ""
172
 
173
- #: admin/class-joinchat-admin.php:441
174
  msgid ""
175
  "You can introduce yourself, offer help or even make promotions to your users."
176
  msgstr ""
177
 
178
- #: admin/class-joinchat-admin.php:447
179
  msgid ""
180
  "If it's defined a \"Call to Action\", the Chat Window can be displayed "
181
  "automatically if conditions are met."
182
  msgstr ""
183
 
184
- #: admin/class-joinchat-admin.php:448 admin/class-joinchat-admin.php:982
185
  msgid "Show Help"
186
  msgstr ""
187
 
188
- #: admin/class-joinchat-admin.php:453
189
  msgid "Visibility Settings"
190
  msgstr ""
191
 
192
- #: admin/class-joinchat-admin.php:454
193
  msgid ""
194
  "From here you can configure on which pages the WhatsApp button will be "
195
  "visible."
196
  msgstr ""
197
 
198
- #: admin/class-joinchat-admin.php:455
199
  msgid "Restore default visibility"
200
  msgstr ""
201
 
202
- #: admin/class-joinchat-admin.php:463
203
  msgid "Custom Post Types"
204
  msgstr ""
205
 
206
- #: admin/class-joinchat-admin.php:489 admin/class-joinchat-admin.php:645
207
- #: admin/class-joinchat-admin.php:918
208
  msgid "Show"
209
  msgstr ""
210
 
211
- #: admin/class-joinchat-admin.php:491 admin/class-joinchat-admin.php:647
212
- #: admin/class-joinchat-admin.php:920
213
  msgid "Hide"
214
  msgstr ""
215
 
216
- #: admin/class-joinchat-admin.php:493
217
  msgid "Inherit"
218
  msgstr ""
219
 
220
- #: admin/class-joinchat-admin.php:503
221
  msgid ""
222
  "Contact phone number <strong>(the button will not be shown if it's empty)"
223
  "</strong>"
224
  msgstr ""
225
 
226
- #: admin/class-joinchat-admin.php:505
227
  #, php-format
228
  msgid "Add unlimited numbers with %1$s or multiple contacts with %2$s"
229
  msgstr ""
230
 
231
- #: admin/class-joinchat-admin.php:514
232
  msgid "Only display the button on mobile devices"
233
  msgstr ""
234
 
235
- #: admin/class-joinchat-admin.php:520
236
  msgid "Left"
237
  msgstr ""
238
 
239
- #: admin/class-joinchat-admin.php:522
240
  msgid "Right"
241
  msgstr ""
242
 
243
- #: admin/class-joinchat-admin.php:532
244
  msgid "Select an image"
245
  msgstr ""
246
 
247
- #: admin/class-joinchat-admin.php:533
248
  msgid "Select button image"
249
  msgstr ""
250
 
251
- #: admin/class-joinchat-admin.php:533
252
  msgid "Use image"
253
  msgstr ""
254
 
255
- #: admin/class-joinchat-admin.php:534
256
  msgid "Remove"
257
  msgstr ""
258
 
259
- #: admin/class-joinchat-admin.php:535
260
- msgid "The image will alternate with WhatsApp logo"
 
 
 
 
 
261
  msgstr ""
262
 
263
- #: admin/class-joinchat-admin.php:539
264
  msgid "💬 Need help?"
265
  msgstr ""
266
 
267
- #: admin/class-joinchat-admin.php:540
268
- msgid "Short text shown next to WhatsApp button"
269
  msgstr ""
270
 
271
- #: admin/class-joinchat-admin.php:544
272
  msgid "seconds"
273
  msgstr ""
274
 
275
- #: admin/class-joinchat-admin.php:545
276
- msgid "Time since the page is opened until the WhatsApp button is displayed"
277
  msgstr ""
278
 
279
- #: admin/class-joinchat-admin.php:551
280
  msgid "Open <em>WhatsApp Web</em> directly on desktop"
281
  msgstr ""
282
 
283
- #: admin/class-joinchat-admin.php:555
284
  msgid ""
285
  "Hello 👋\n"
286
  "Can we help you?"
287
  msgstr ""
288
 
289
- #: admin/class-joinchat-admin.php:556
290
  msgid "Define a text to encourage users to contact by WhatsApp"
291
  msgstr ""
292
 
293
- #: admin/class-joinchat-admin.php:558
294
  #, php-format
295
  msgid "Add links, images, videos and more with %s"
296
  msgstr ""
297
 
298
- #: admin/class-joinchat-admin.php:564
299
  msgid "Hi *{SITE}*! I need more info about {TITLE} {URL}"
300
  msgstr ""
301
 
302
- #: admin/class-joinchat-admin.php:565
303
  msgid "Predefined text for the first message the user will send you"
304
  msgstr ""
305
 
306
- #: admin/class-joinchat-admin.php:570
307
- msgid "Text of the start WhatsApp button on Chat Window"
308
  msgstr ""
309
 
310
- #: admin/class-joinchat-admin.php:574
311
  msgid "seconds (0 disabled)"
312
  msgstr ""
313
 
314
- #: admin/class-joinchat-admin.php:575
315
  msgid "Chat Window auto displays after delay"
316
  msgstr ""
317
 
318
- #: admin/class-joinchat-admin.php:580
319
  msgid "Chat Window auto displays from this number of page views"
320
  msgstr ""
321
 
322
- #: admin/class-joinchat-admin.php:586
323
  msgid ""
324
  "Display a notification balloon instead of opening the Chat Window for a "
325
  "\"less intrusive\" mode"
326
  msgstr ""
327
 
328
- #: admin/class-joinchat-admin.php:596
329
  msgid "No"
330
  msgstr ""
331
 
332
- #: admin/class-joinchat-admin.php:598
333
  msgid "Yes"
334
  msgstr ""
335
 
336
- #: admin/class-joinchat-admin.php:600
337
  msgid "Auto (detects device dark mode)"
338
  msgstr ""
339
 
340
- #: admin/class-joinchat-admin.php:606
341
  msgid "Remove \"Powered by Join.chat\" link"
342
  msgstr ""
343
 
344
- #: admin/class-joinchat-admin.php:608
345
  #, php-format
346
  msgid "Included with all our %1$sadd-ons%2$s"
347
  msgstr ""
348
 
349
- #: admin/class-joinchat-admin.php:673 admin/class-joinchat-admin.php:766
350
- msgctxt "url lang slug (only available for spanish \"es\")"
351
- msgid "en"
352
- msgstr ""
353
-
354
- #: admin/class-joinchat-admin.php:678
355
  msgid "Support and Help"
356
  msgstr ""
357
 
358
- #: admin/class-joinchat-admin.php:681
359
  #, php-format
360
  msgid ""
361
  "If you need help, first review our <a href=\"%1$s\" target=\"_blank\">"
@@ -364,125 +370,126 @@ msgid ""
364
  "href=\"%3$s\" target=\"_blank\">premium support</a>."
365
  msgstr ""
366
 
367
- #: admin/class-joinchat-admin.php:686
368
  msgid "If you like Join.chat 😍"
369
  msgstr ""
370
 
371
- #: admin/class-joinchat-admin.php:689
372
  #, php-format
373
  msgid "Please leave us a %s rating. We'll thank you."
374
  msgstr ""
375
 
376
- #: admin/class-joinchat-admin.php:693
377
  #, php-format
378
  msgid "Subscribe to our newsletter and visit our blog at %s."
379
  msgstr ""
380
 
381
- #: admin/class-joinchat-admin.php:697
382
  #, php-format
383
  msgid "Follow %s on twitter."
384
  msgstr ""
385
 
386
- #: admin/class-joinchat-admin.php:704
387
  msgid "Styles and Variables"
388
  msgstr ""
389
 
390
- #: admin/class-joinchat-admin.php:706
391
  msgid ""
392
  "You can use formatting styles like in WhatsApp: _<em>italic</em>_ *<strong>"
393
  "bold</strong>* ~<del>strikethrough</del>~."
394
  msgstr ""
395
 
396
- #: admin/class-joinchat-admin.php:707
397
  msgid ""
398
  "You can use dynamic variables that will be replaced by the values of the "
399
  "page the user visits:"
400
  msgstr ""
401
 
402
- #: admin/class-joinchat-admin.php:711
403
  msgid "Page Title"
404
  msgstr ""
405
 
406
- #: admin/class-joinchat-admin.php:716
407
  msgid "Triggers"
408
  msgstr ""
409
 
410
- #: admin/class-joinchat-admin.php:718
411
  msgid ""
412
  "Chat Window with a Call to Action (CTA) can be displayed automatically after "
413
  "a defined delay time and from a number of page views."
414
  msgstr ""
415
 
416
- #: admin/class-joinchat-admin.php:719
417
  msgid ""
418
  "When the user close Chat Window or open WhatsApp, that CTA will not "
419
  "automatically show again."
420
  msgstr ""
421
 
422
- #: admin/class-joinchat-admin.php:720
423
  msgid ""
424
  "You can also interact with Join.chat in your pages adding some CSS classes "
425
  "to your HTML:"
426
  msgstr ""
427
 
428
- #: admin/class-joinchat-admin.php:722
429
  msgid "to show Chat Window or open WhatsApp on click."
430
  msgstr ""
431
 
432
- #: admin/class-joinchat-admin.php:723
433
  msgid "to hide Chat Window on click."
434
  msgstr ""
435
 
436
- #: admin/class-joinchat-admin.php:724
437
  msgid ""
438
  "To show Chat Window when an HTML element appears on screen when user scrolls:"
439
  msgstr ""
440
 
441
- #: admin/class-joinchat-admin.php:726
442
  msgid "only show if it's an not seen CTA."
443
  msgstr ""
444
 
445
- #: admin/class-joinchat-admin.php:727
446
  msgid "to show allways."
447
  msgstr ""
448
 
449
- #: admin/class-joinchat-admin.php:748
450
  msgid "Settings"
451
  msgstr ""
452
 
453
- #: admin/class-joinchat-admin.php:768
454
  msgid "Documentation"
455
  msgstr ""
456
 
457
- #: admin/class-joinchat-admin.php:769
458
  msgid "Add-ons"
459
  msgstr ""
460
 
461
- #: admin/class-joinchat-admin.php:770
462
  msgid "Support"
463
  msgstr ""
464
 
465
- #: admin/class-joinchat-admin.php:801
466
  msgid "Join.chat Settings"
467
  msgstr ""
468
 
469
- #: admin/class-joinchat-admin.php:842
 
470
  msgid "Join.chat"
471
  msgstr ""
472
 
473
- #: admin/class-joinchat-admin.php:912
474
  msgid "Can use vars"
475
  msgstr ""
476
 
477
- #: admin/class-joinchat-admin.php:914
478
  msgid "to leave it blank use"
479
  msgstr ""
480
 
481
- #: admin/class-joinchat-admin.php:922
482
  msgid "Default visibility"
483
  msgstr ""
484
 
485
- #: admin/class-joinchat-admin.php:981
486
  msgid "You can use vars"
487
  msgstr ""
488
 
@@ -578,12 +585,6 @@ msgid ""
578
  "use:"
579
  msgstr ""
580
 
581
- #: includes/class-joinchat.php:300
582
- msgid ""
583
- "<strong>WAme</strong> now is <strong>Join.chat</strong>. Please, deactivate "
584
- "and re-activate plugin to migrate settings."
585
- msgstr ""
586
-
587
  #. Description of the plugin
588
  msgid ""
589
  "Connects a WordPress chat with WhatsApp. The best solution for marketing and "
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Join.chat\n"
5
+ "POT-Creation-Date: 2020-06-25 11:09+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"
22
  "Language: "
23
 
24
  #: public/class-joinchat-public.php:103 admin/class-joinchat-admin.php:119
25
+ #: admin/class-joinchat-admin.php:582
26
  msgid "Open chat"
27
  msgstr ""
28
 
29
+ #: public/class-joinchat-public.php:257 admin/class-joinchat-admin.php:507
30
+ #: admin/class-joinchat-admin.php:686 admin/class-joinchat-admin.php:782
31
+ msgctxt "url lang slug (only available for spanish \"es\")"
32
+ msgid "en"
33
+ msgstr ""
34
+
35
+ #: public/class-joinchat-public.php:319
36
  msgid "Close"
37
  msgstr ""
38
 
44
  msgid "Visibility"
45
  msgstr ""
46
 
47
+ #: admin/class-joinchat-admin.php:242 admin/class-joinchat-admin.php:917
48
  msgid "Telephone"
49
  msgstr ""
50
 
51
+ #: admin/class-joinchat-admin.php:243 admin/class-joinchat-admin.php:925
52
  msgid "Message"
53
  msgstr ""
54
 
55
+ #: admin/class-joinchat-admin.php:244
 
 
 
 
56
  msgid "Image"
57
  msgstr ""
58
 
59
+ #: admin/class-joinchat-admin.php:245
60
  msgid "Tooltip"
61
  msgstr ""
62
 
63
+ #: admin/class-joinchat-admin.php:246 admin/class-joinchat-admin.php:527
64
+ msgid "Position on Screen"
65
+ msgstr ""
66
+
67
+ #: admin/class-joinchat-admin.php:247
68
  msgid "Button Delay"
69
  msgstr ""
70
 
71
+ #: admin/class-joinchat-admin.php:248 admin/class-joinchat-admin.php:521
72
  msgid "Mobile Only"
73
  msgstr ""
74
 
75
+ #: admin/class-joinchat-admin.php:249 admin/class-joinchat-admin.php:562
76
  msgid "WhatsApp Web"
77
  msgstr ""
78
 
79
+ #: admin/class-joinchat-admin.php:252 admin/class-joinchat-admin.php:921
80
  msgid "Call to Action"
81
  msgstr ""
82
 
83
+ #: admin/class-joinchat-admin.php:253
84
+ msgid "Open Chat"
85
  msgstr ""
86
 
87
+ #: admin/class-joinchat-admin.php:254
88
  msgid "Theme Color"
89
  msgstr ""
90
 
91
+ #: admin/class-joinchat-admin.php:255 admin/class-joinchat-admin.php:607
92
  msgid "Dark Mode"
93
  msgstr ""
94
 
95
+ #: admin/class-joinchat-admin.php:256 admin/class-joinchat-admin.php:617
96
  msgid "Logo"
97
  msgstr ""
98
 
99
+ #: admin/class-joinchat-admin.php:259
100
  msgid "Chat Delay"
101
  msgstr ""
102
 
103
+ #: admin/class-joinchat-admin.php:260
104
  msgid "Page Views"
105
  msgstr ""
106
 
107
+ #: admin/class-joinchat-admin.php:261 admin/class-joinchat-admin.php:597
108
  msgid "Notification Balloon"
109
  msgstr ""
110
 
111
+ #: admin/class-joinchat-admin.php:270
112
  msgid "Global"
113
  msgstr ""
114
 
115
+ #: admin/class-joinchat-admin.php:275
116
  msgid "Front Page"
117
  msgstr ""
118
 
119
+ #: admin/class-joinchat-admin.php:276
120
  msgid "Blog Page"
121
  msgstr ""
122
 
123
+ #: admin/class-joinchat-admin.php:277
124
  msgid "404 Page"
125
  msgstr ""
126
 
127
+ #: admin/class-joinchat-admin.php:278
128
  msgid "Search Results"
129
  msgstr ""
130
 
131
+ #: admin/class-joinchat-admin.php:279
132
  msgid "Archives"
133
  msgstr ""
134
 
135
+ #: admin/class-joinchat-admin.php:280
136
  msgid "Date Archives"
137
  msgstr ""
138
 
139
+ #: admin/class-joinchat-admin.php:281
140
  msgid "Author Archives"
141
  msgstr ""
142
 
143
+ #: admin/class-joinchat-admin.php:282
144
  msgid "Singular"
145
  msgstr ""
146
 
147
+ #: admin/class-joinchat-admin.php:283
148
  msgid "Page"
149
  msgstr ""
150
 
151
+ #: admin/class-joinchat-admin.php:284
152
  msgid "Post"
153
  msgstr ""
154
 
155
+ #: admin/class-joinchat-admin.php:394
156
  msgid "Settings saved"
157
  msgstr ""
158
 
159
+ #: admin/class-joinchat-admin.php:441
160
  msgid "Button"
161
  msgstr ""
162
 
163
+ #: admin/class-joinchat-admin.php:442
164
  msgid ""
165
  "Set the contact number and where you want the WhatsApp button to be "
166
  "displayed."
167
  msgstr ""
168
 
169
+ #: admin/class-joinchat-admin.php:446
170
  msgid "Chat Window"
171
  msgstr ""
172
 
173
+ #: admin/class-joinchat-admin.php:448
174
  msgid ""
175
  "If you define a \"Call to Action\" a window will be displayed simulating a "
176
  "chat before launching WhatsApp."
177
  msgstr ""
178
 
179
+ #: admin/class-joinchat-admin.php:449
180
  msgid ""
181
  "You can introduce yourself, offer help or even make promotions to your users."
182
  msgstr ""
183
 
184
+ #: admin/class-joinchat-admin.php:455
185
  msgid ""
186
  "If it's defined a \"Call to Action\", the Chat Window can be displayed "
187
  "automatically if conditions are met."
188
  msgstr ""
189
 
190
+ #: admin/class-joinchat-admin.php:456 admin/class-joinchat-admin.php:1008
191
  msgid "Show Help"
192
  msgstr ""
193
 
194
+ #: admin/class-joinchat-admin.php:461
195
  msgid "Visibility Settings"
196
  msgstr ""
197
 
198
+ #: admin/class-joinchat-admin.php:462
199
  msgid ""
200
  "From here you can configure on which pages the WhatsApp button will be "
201
  "visible."
202
  msgstr ""
203
 
204
+ #: admin/class-joinchat-admin.php:463
205
  msgid "Restore default visibility"
206
  msgstr ""
207
 
208
+ #: admin/class-joinchat-admin.php:471
209
  msgid "Custom Post Types"
210
  msgstr ""
211
 
212
+ #: admin/class-joinchat-admin.php:497 admin/class-joinchat-admin.php:658
213
+ #: admin/class-joinchat-admin.php:934
214
  msgid "Show"
215
  msgstr ""
216
 
217
+ #: admin/class-joinchat-admin.php:499 admin/class-joinchat-admin.php:660
218
+ #: admin/class-joinchat-admin.php:936
219
  msgid "Hide"
220
  msgstr ""
221
 
222
+ #: admin/class-joinchat-admin.php:501
223
  msgid "Inherit"
224
  msgstr ""
225
 
226
+ #: admin/class-joinchat-admin.php:512
227
  msgid ""
228
  "Contact phone number <strong>(the button will not be shown if it's empty)"
229
  "</strong>"
230
  msgstr ""
231
 
232
+ #: admin/class-joinchat-admin.php:514
233
  #, php-format
234
  msgid "Add unlimited numbers with %1$s or multiple contacts with %2$s"
235
  msgstr ""
236
 
237
+ #: admin/class-joinchat-admin.php:523
238
  msgid "Only display the button on mobile devices"
239
  msgstr ""
240
 
241
+ #: admin/class-joinchat-admin.php:529
242
  msgid "Left"
243
  msgstr ""
244
 
245
+ #: admin/class-joinchat-admin.php:531
246
  msgid "Right"
247
  msgstr ""
248
 
249
+ #: admin/class-joinchat-admin.php:541
250
  msgid "Select an image"
251
  msgstr ""
252
 
253
+ #: admin/class-joinchat-admin.php:542
254
  msgid "Select button image"
255
  msgstr ""
256
 
257
+ #: admin/class-joinchat-admin.php:542
258
  msgid "Use image"
259
  msgstr ""
260
 
261
+ #: admin/class-joinchat-admin.php:543
262
  msgid "Remove"
263
  msgstr ""
264
 
265
+ #: admin/class-joinchat-admin.php:544
266
+ msgid "The image will alternate with button icon"
267
+ msgstr ""
268
+
269
+ #: admin/class-joinchat-admin.php:546
270
+ #, php-format
271
+ msgid "Other icons and more channels (Telegram, Messenger…) with %s"
272
  msgstr ""
273
 
274
+ #: admin/class-joinchat-admin.php:552
275
  msgid "💬 Need help?"
276
  msgstr ""
277
 
278
+ #: admin/class-joinchat-admin.php:553
279
+ msgid "Short text shown next to button"
280
  msgstr ""
281
 
282
+ #: admin/class-joinchat-admin.php:557
283
  msgid "seconds"
284
  msgstr ""
285
 
286
+ #: admin/class-joinchat-admin.php:558
287
+ msgid "Time since the page is opened until the button is displayed"
288
  msgstr ""
289
 
290
+ #: admin/class-joinchat-admin.php:564
291
  msgid "Open <em>WhatsApp Web</em> directly on desktop"
292
  msgstr ""
293
 
294
+ #: admin/class-joinchat-admin.php:568
295
  msgid ""
296
  "Hello 👋\n"
297
  "Can we help you?"
298
  msgstr ""
299
 
300
+ #: admin/class-joinchat-admin.php:569
301
  msgid "Define a text to encourage users to contact by WhatsApp"
302
  msgstr ""
303
 
304
+ #: admin/class-joinchat-admin.php:571
305
  #, php-format
306
  msgid "Add links, images, videos and more with %s"
307
  msgstr ""
308
 
309
+ #: admin/class-joinchat-admin.php:577
310
  msgid "Hi *{SITE}*! I need more info about {TITLE} {URL}"
311
  msgstr ""
312
 
313
+ #: admin/class-joinchat-admin.php:578
314
  msgid "Predefined text for the first message the user will send you"
315
  msgstr ""
316
 
317
+ #: admin/class-joinchat-admin.php:583
318
+ msgid "Text to open chat on Chat Window button"
319
  msgstr ""
320
 
321
+ #: admin/class-joinchat-admin.php:587
322
  msgid "seconds (0 disabled)"
323
  msgstr ""
324
 
325
+ #: admin/class-joinchat-admin.php:588
326
  msgid "Chat Window auto displays after delay"
327
  msgstr ""
328
 
329
+ #: admin/class-joinchat-admin.php:593
330
  msgid "Chat Window auto displays from this number of page views"
331
  msgstr ""
332
 
333
+ #: admin/class-joinchat-admin.php:599
334
  msgid ""
335
  "Display a notification balloon instead of opening the Chat Window for a "
336
  "\"less intrusive\" mode"
337
  msgstr ""
338
 
339
+ #: admin/class-joinchat-admin.php:609
340
  msgid "No"
341
  msgstr ""
342
 
343
+ #: admin/class-joinchat-admin.php:611
344
  msgid "Yes"
345
  msgstr ""
346
 
347
+ #: admin/class-joinchat-admin.php:613
348
  msgid "Auto (detects device dark mode)"
349
  msgstr ""
350
 
351
+ #: admin/class-joinchat-admin.php:619
352
  msgid "Remove \"Powered by Join.chat\" link"
353
  msgstr ""
354
 
355
+ #: admin/class-joinchat-admin.php:621
356
  #, php-format
357
  msgid "Included with all our %1$sadd-ons%2$s"
358
  msgstr ""
359
 
360
+ #: admin/class-joinchat-admin.php:691
 
 
 
 
 
361
  msgid "Support and Help"
362
  msgstr ""
363
 
364
+ #: admin/class-joinchat-admin.php:694
365
  #, php-format
366
  msgid ""
367
  "If you need help, first review our <a href=\"%1$s\" target=\"_blank\">"
370
  "href=\"%3$s\" target=\"_blank\">premium support</a>."
371
  msgstr ""
372
 
373
+ #: admin/class-joinchat-admin.php:699
374
  msgid "If you like Join.chat 😍"
375
  msgstr ""
376
 
377
+ #: admin/class-joinchat-admin.php:702
378
  #, php-format
379
  msgid "Please leave us a %s rating. We'll thank you."
380
  msgstr ""
381
 
382
+ #: admin/class-joinchat-admin.php:706
383
  #, php-format
384
  msgid "Subscribe to our newsletter and visit our blog at %s."
385
  msgstr ""
386
 
387
+ #: admin/class-joinchat-admin.php:710
388
  #, php-format
389
  msgid "Follow %s on twitter."
390
  msgstr ""
391
 
392
+ #: admin/class-joinchat-admin.php:717
393
  msgid "Styles and Variables"
394
  msgstr ""
395
 
396
+ #: admin/class-joinchat-admin.php:719
397
  msgid ""
398
  "You can use formatting styles like in WhatsApp: _<em>italic</em>_ *<strong>"
399
  "bold</strong>* ~<del>strikethrough</del>~."
400
  msgstr ""
401
 
402
+ #: admin/class-joinchat-admin.php:720
403
  msgid ""
404
  "You can use dynamic variables that will be replaced by the values of the "
405
  "page the user visits:"
406
  msgstr ""
407
 
408
+ #: admin/class-joinchat-admin.php:724
409
  msgid "Page Title"
410
  msgstr ""
411
 
412
+ #: admin/class-joinchat-admin.php:729
413
  msgid "Triggers"
414
  msgstr ""
415
 
416
+ #: admin/class-joinchat-admin.php:731
417
  msgid ""
418
  "Chat Window with a Call to Action (CTA) can be displayed automatically after "
419
  "a defined delay time and from a number of page views."
420
  msgstr ""
421
 
422
+ #: admin/class-joinchat-admin.php:732
423
  msgid ""
424
  "When the user close Chat Window or open WhatsApp, that CTA will not "
425
  "automatically show again."
426
  msgstr ""
427
 
428
+ #: admin/class-joinchat-admin.php:733
429
  msgid ""
430
  "You can also interact with Join.chat in your pages adding some CSS classes "
431
  "to your HTML:"
432
  msgstr ""
433
 
434
+ #: admin/class-joinchat-admin.php:735
435
  msgid "to show Chat Window or open WhatsApp on click."
436
  msgstr ""
437
 
438
+ #: admin/class-joinchat-admin.php:736
439
  msgid "to hide Chat Window on click."
440
  msgstr ""
441
 
442
+ #: admin/class-joinchat-admin.php:737
443
  msgid ""
444
  "To show Chat Window when an HTML element appears on screen when user scrolls:"
445
  msgstr ""
446
 
447
+ #: admin/class-joinchat-admin.php:739
448
  msgid "only show if it's an not seen CTA."
449
  msgstr ""
450
 
451
+ #: admin/class-joinchat-admin.php:740
452
  msgid "to show allways."
453
  msgstr ""
454
 
455
+ #: admin/class-joinchat-admin.php:762
456
  msgid "Settings"
457
  msgstr ""
458
 
459
+ #: admin/class-joinchat-admin.php:784
460
  msgid "Documentation"
461
  msgstr ""
462
 
463
+ #: admin/class-joinchat-admin.php:785
464
  msgid "Add-ons"
465
  msgstr ""
466
 
467
+ #: admin/class-joinchat-admin.php:786
468
  msgid "Support"
469
  msgstr ""
470
 
471
+ #: admin/class-joinchat-admin.php:817
472
  msgid "Join.chat Settings"
473
  msgstr ""
474
 
475
+ #. Name of the plugin
476
+ #: admin/class-joinchat-admin.php:858
477
  msgid "Join.chat"
478
  msgstr ""
479
 
480
+ #: admin/class-joinchat-admin.php:928
481
  msgid "Can use vars"
482
  msgstr ""
483
 
484
+ #: admin/class-joinchat-admin.php:930
485
  msgid "to leave it blank use"
486
  msgstr ""
487
 
488
+ #: admin/class-joinchat-admin.php:938
489
  msgid "Default visibility"
490
  msgstr ""
491
 
492
+ #: admin/class-joinchat-admin.php:1007
493
  msgid "You can use vars"
494
  msgstr ""
495
 
585
  "use:"
586
  msgstr ""
587
 
 
 
 
 
 
 
588
  #. Description of the plugin
589
  msgid ""
590
  "Connects a WordPress chat with WhatsApp. The best solution for marketing and "
public/class-joinchat-public.php CHANGED
@@ -176,10 +176,6 @@ class JoinChatPublic {
176
  // Set a simple CTA hash, empty '' if no CTA (for javascript store viewed CTAs)
177
  $this->settings['message_hash'] = ltrim( hash( 'crc32', $this->settings['message_text'] ), '0' );
178
 
179
- // Ensure not show if not phone
180
- if ( '' == $this->settings['telephone'] ) {
181
- $this->show = false;
182
- }
183
  }
184
 
185
  /**
@@ -197,7 +193,7 @@ class JoinChatPublic {
197
  list($r, $g, $b) = sscanf( $color, '#%02x%02x%02x' );
198
 
199
  wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . "css/{$this->plugin_name}{$min}.css", array(), $this->version, 'all' );
200
- wp_add_inline_style( $this->plugin_name, apply_filters( 'joinchat_inline_style', ".joinchat{ --red:$r; --green:$g; --blue:$b; }", $color ) );
201
  }
202
 
203
  }
@@ -265,14 +261,14 @@ class JoinChatPublic {
265
  $image = apply_filters( 'joinchat_image', null );
266
 
267
  if ( is_null( $image ) && $this->settings['button_image'] ) {
268
- $img_path = get_attached_file( $this->settings['button_image'] );
269
-
270
- if ( apply_filters( 'joinchat_image_original', JoinChatUtil::is_animated_gif( $img_path ) ) ) {
271
- $image = '<img src="' . wp_get_attachment_url( $this->settings['button_image'] ) . '" alt="">';
272
- } elseif ( is_array( JoinChatUtil::thumb( $img_path, 58, 58 ) ) ) {
273
- $thumb = JoinChatUtil::thumb( $img_path, 58, 58 );
274
- $thumb2 = JoinChatUtil::thumb( $img_path, 116, 116 );
275
- $thumb3 = JoinChatUtil::thumb( $img_path, 174, 174 );
276
  $image = "<img src=\"{$thumb['url']}\" srcset=\"{$thumb2['url']} 2x, {$thumb3['url']} 3x\" alt=\"\">";
277
  }
278
  }
176
  // Set a simple CTA hash, empty '' if no CTA (for javascript store viewed CTAs)
177
  $this->settings['message_hash'] = ltrim( hash( 'crc32', $this->settings['message_text'] ), '0' );
178
 
 
 
 
 
179
  }
180
 
181
  /**
193
  list($r, $g, $b) = sscanf( $color, '#%02x%02x%02x' );
194
 
195
  wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . "css/{$this->plugin_name}{$min}.css", array(), $this->version, 'all' );
196
+ wp_add_inline_style( $this->plugin_name, apply_filters( 'joinchat_inline_style', ".joinchat{ --red:$r; --green:$g; --blue:$b; }", $this->settings ) );
197
  }
198
 
199
  }
261
  $image = apply_filters( 'joinchat_image', null );
262
 
263
  if ( is_null( $image ) && $this->settings['button_image'] ) {
264
+ $img_id = $this->settings['button_image'];
265
+
266
+ if ( apply_filters( 'joinchat_image_original', JoinChatUtil::is_animated_gif( $img_id ) ) ) {
267
+ $image = '<img src="' . wp_get_attachment_url( $img_id ) . '" alt="">';
268
+ } elseif ( is_array( JoinChatUtil::thumb( $img_id, 58, 58 ) ) ) {
269
+ $thumb = JoinChatUtil::thumb( $img_id, 58, 58 );
270
+ $thumb2 = JoinChatUtil::thumb( $img_id, 116, 116 );
271
+ $thumb3 = JoinChatUtil::thumb( $img_id, 174, 174 );
272
  $image = "<img src=\"{$thumb['url']}\" srcset=\"{$thumb2['url']} 2x, {$thumb3['url']} 3x\" alt=\"\">";
273
  }
274
  }
public/css/joinchat.css CHANGED
@@ -2,6 +2,7 @@
2
  --bottom: 20px;
3
  --sep: 20px;
4
  --header: 70px;
 
5
  --red: 37;
6
  --green: 211;
7
  --blue: 102;
@@ -12,7 +13,7 @@
12
  --bg: rgba(var(--rgb), 0.04);
13
  --tolerance: 210;
14
  --bw: calc((var(--red)*0.2126 + var(--green)*0.7152 + var(--blue)*0.0722 - var(--tolerance))*-100000);
15
- --text: rgba(var(--bw), var(--bw), var(--bw), min(0.9, max(0.7, var(--bw))));
16
  --msg: var(--color);
17
 
18
  position: fixed;
@@ -77,12 +78,12 @@
77
  z-index: 2;
78
  bottom: 8px;
79
  right: 8px;
80
- height: 60px;
81
- min-width: 60px;
82
  max-width: 95vw;
83
  background: #25d366;
84
  color: inherit;
85
- border-radius: 30px;
86
  box-shadow: 1px 6px 24px 0 rgba(7, 94, 84, 0.24);
87
  cursor: pointer;
88
  transition: background 0.2s linear;
@@ -126,10 +127,10 @@
126
  }
127
 
128
  .joinchat__button__open {
129
- width: 60px;
130
- height: 60px;
131
  background: rgba(0, 0, 0, 0) 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") center no-repeat;
132
- background-size: 36px;
133
  }
134
 
135
  .joinchat--chatbox .joinchat__button__open {
@@ -140,8 +141,8 @@
140
  position: absolute;
141
  top: 1px;
142
  right: 1px;
143
- width: 58px;
144
- height: 58px;
145
  border-radius: 50%;
146
  overflow: hidden;
147
  opacity: 0;
@@ -169,9 +170,9 @@
169
 
170
  .joinchat__button__send {
171
  display: none;
172
- width: 60px;
173
- height: 60px;
174
- max-width: 60px;
175
  padding: 12px 11px 12px 13px;
176
  margin: 0;
177
  flex-shrink: 0;
@@ -202,7 +203,7 @@
202
  padding: 0;
203
  max-width: 0;
204
  font-weight: 600;
205
- line-height: 60px;
206
  white-space: nowrap;
207
  opacity: 0;
208
  overflow: hidden;
@@ -335,12 +336,18 @@
335
  }
336
 
337
  .joinchat__header {
 
338
  flex-shrink: 0;
339
  height: var(--header);
340
  line-height: var(--header);
341
  padding: 0 26px;
342
  margin: 0;
343
  background: var(--color);
 
 
 
 
 
344
  }
345
 
346
  .joinchat--dark .joinchat__header {
@@ -353,7 +360,7 @@
353
  color: inherit !important;
354
  text-decoration: none !important;
355
  fill: currentColor;
356
- opacity: 0.7;
357
  }
358
 
359
  .joinchat__copy svg {
@@ -363,8 +370,8 @@
363
  vertical-align: -26%;
364
  }
365
 
366
- .joinchat__copy:hover,
367
- .joinchat__copy:active {
368
  color: inherit !important;
369
  text-decoration: none !important;
370
  opacity: 0.9;
@@ -372,10 +379,11 @@
372
 
373
  .joinchat__close {
374
  position: absolute;
375
- top: 18px;
376
  right: 24px;
377
  width: 34px;
378
  height: 34px;
 
379
  border-radius: 50%;
380
  background: rgba(0, 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") center no-repeat;
381
  background-size: 12px;
@@ -394,7 +402,8 @@
394
  }
395
 
396
  .joinchat__box__scroll {
397
- padding: 20px 0 80px 0;
 
398
  background: #fff linear-gradient(0deg, var(--bg), var(--bg));
399
  overflow-x: hidden;
400
  overflow-y: auto;
@@ -434,13 +443,13 @@
434
 
435
  @media (max-width: 480px), (orientation: landscape) and (max-width: 767px) {
436
  .joinchat__close {
437
- top: 13px;
438
  width: 28px;
439
  height: 28px;
440
  }
441
 
442
  .joinchat__box__scroll {
443
- padding: 15px 0 70px 0;
444
  }
445
  }
446
 
2
  --bottom: 20px;
3
  --sep: 20px;
4
  --header: 70px;
5
+ --btn: 60px;
6
  --red: 37;
7
  --green: 211;
8
  --blue: 102;
13
  --bg: rgba(var(--rgb), 0.04);
14
  --tolerance: 210;
15
  --bw: calc((var(--red)*0.2126 + var(--green)*0.7152 + var(--blue)*0.0722 - var(--tolerance))*-100000);
16
+ --text: rgba(var(--bw), var(--bw), var(--bw), min(1, max(0.7, var(--bw))));
17
  --msg: var(--color);
18
 
19
  position: fixed;
78
  z-index: 2;
79
  bottom: 8px;
80
  right: 8px;
81
+ height: var(--btn);
82
+ min-width: var(--btn);
83
  max-width: 95vw;
84
  background: #25d366;
85
  color: inherit;
86
+ border-radius: calc(var(--btn)/2);
87
  box-shadow: 1px 6px 24px 0 rgba(7, 94, 84, 0.24);
88
  cursor: pointer;
89
  transition: background 0.2s linear;
127
  }
128
 
129
  .joinchat__button__open {
130
+ width: var(--btn);
131
+ height: var(--btn);
132
  background: rgba(0, 0, 0, 0) 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") center no-repeat;
133
+ background-size: 60%;
134
  }
135
 
136
  .joinchat--chatbox .joinchat__button__open {
141
  position: absolute;
142
  top: 1px;
143
  right: 1px;
144
+ width: calc(var(--btn) - 2px);
145
+ height: calc(var(--btn) - 2px);
146
  border-radius: 50%;
147
  overflow: hidden;
148
  opacity: 0;
170
 
171
  .joinchat__button__send {
172
  display: none;
173
+ width: var(--btn);
174
+ height: var(--btn);
175
+ max-width: var(--btn);
176
  padding: 12px 11px 12px 13px;
177
  margin: 0;
178
  flex-shrink: 0;
203
  padding: 0;
204
  max-width: 0;
205
  font-weight: 600;
206
+ line-height: var(--btn);
207
  white-space: nowrap;
208
  opacity: 0;
209
  overflow: hidden;
336
  }
337
 
338
  .joinchat__header {
339
+ position: relative;
340
  flex-shrink: 0;
341
  height: var(--header);
342
  line-height: var(--header);
343
  padding: 0 26px;
344
  margin: 0;
345
  background: var(--color);
346
+ text-align: left;
347
+ }
348
+
349
+ [dir=rtl] .joinchat__header {
350
+ text-align: right;
351
  }
352
 
353
  .joinchat--dark .joinchat__header {
360
  color: inherit !important;
361
  text-decoration: none !important;
362
  fill: currentColor;
363
+ opacity: 0.8;
364
  }
365
 
366
  .joinchat__copy svg {
370
  vertical-align: -26%;
371
  }
372
 
373
+ a.joinchat__copy:hover,
374
+ a.joinchat__copy:active {
375
  color: inherit !important;
376
  text-decoration: none !important;
377
  opacity: 0.9;
379
 
380
  .joinchat__close {
381
  position: absolute;
382
+ top: 50%;
383
  right: 24px;
384
  width: 34px;
385
  height: 34px;
386
+ margin-top: -16px;
387
  border-radius: 50%;
388
  background: rgba(0, 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") center no-repeat;
389
  background-size: 12px;
402
  }
403
 
404
  .joinchat__box__scroll {
405
+ padding: 20px 0 70px 0;
406
+ padding-bottom: calc(var(--btn) + 10px);
407
  background: #fff linear-gradient(0deg, var(--bg), var(--bg));
408
  overflow-x: hidden;
409
  overflow-y: auto;
443
 
444
  @media (max-width: 480px), (orientation: landscape) and (max-width: 767px) {
445
  .joinchat__close {
446
+ margin-top: -14px;
447
  width: 28px;
448
  height: 28px;
449
  }
450
 
451
  .joinchat__box__scroll {
452
+ padding-top: 15px;
453
  }
454
  }
455
 
public/css/joinchat.min.css CHANGED
@@ -1 +1 @@
1
- .joinchat{--bottom:20px;--sep:20px;--header:70px;--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(0.9,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:60px;min-width:60px;max-width:95vw;background:#25d366;color:inherit;border-radius:30px;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:60px;height:60px;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:36px}.joinchat--chatbox .joinchat__button__open{display:none}.joinchat__button__image{position:absolute;top:1px;right:1px;width:58px;height:58px;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:60px;height:60px;max-width:60px;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:60px;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;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;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}.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(100vh - 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:opacity .4s ease-out,transform 0ms linear .3s}.joinchat--chatbox .joinchat__box{opacity:1;transform:scaleX(1);transition:opacity .2s ease-out,transform 0ms linear}.joinchat--left .joinchat__box{right:auto;left:0}.joinchat__header{flex-shrink:0;height:var(--header);line-height:var(--header);padding:0 26px;margin:0;background:var(--color)}.joinchat--dark .joinchat__header{background:var(--dark)}.joinchat__copy{font-size:11px;line-height:18px;color:inherit!important;text-decoration:none!important;fill:currentColor;opacity:.7}.joinchat__copy svg{display:inline-block;width:auto;height:18px;vertical-align:-26%}.joinchat__copy:active,.joinchat__copy:hover{color:inherit!important;text-decoration:none!important;opacity:.9}.joinchat__close{position:absolute;top:18px;right:24px;width:34px;height:34px;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 80px;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__close{top:13px;width:28px;height:28px}.joinchat__box__scroll{padding:15px 0 70px}}@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;--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;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;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}.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(100vh - 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:opacity .4s ease-out,transform 0ms linear .3s}.joinchat--chatbox .joinchat__box{opacity:1;transform:scaleX(1);transition:opacity .2s ease-out,transform 0ms linear}.joinchat--left .joinchat__box{right:auto;left:0}.joinchat__header{position:relative;flex-shrink:0;height:var(--header);line-height:var(--header);padding: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__copy{font-size:11px;line-height:18px;color:inherit!important;text-decoration:none!important;fill:currentColor;opacity:.8}.joinchat__copy svg{display:inline-block;width:auto;height:18px;vertical-align:-26%}a.joinchat__copy:active,a.joinchat__copy:hover{color:inherit!important;text-decoration:none!important;opacity:.9}.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__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
@@ -16,20 +16,22 @@
16
  };
17
 
18
  // Trigger Google Analytics event
19
- joinchat_obj.send_event = function (link) {
20
  var ga_tracker = window[this.settings.ga_tracker || 'ga'];
 
 
21
 
22
  // Send Google Analtics custom event (Universal Analtics - analytics.js) or (Global Site Tag - gtag.js)
23
  if (typeof ga_tracker == 'function' && typeof ga_tracker.getAll == 'function') {
24
  ga_tracker('set', 'transport', 'beacon');
25
  var trackers = ga_tracker.getAll();
26
  trackers.forEach(function (tracker) {
27
- tracker.send("event", 'JoinChat', 'click', link);
28
  });
29
  } else if (typeof gtag == 'function') {
30
- gtag('event', 'click', {
31
  'event_category': 'JoinChat',
32
- 'event_label': link,
33
  'transport_type': 'beacon'
34
  });
35
  }
@@ -38,14 +40,14 @@
38
  if (typeof dataLayer == 'object') {
39
  dataLayer.push({
40
  'event': 'JoinChat',
41
- 'eventAction': 'click',
42
- 'eventLabel': link
43
  });
44
  }
45
 
46
  // Send Facebook Pixel custom event
47
  if (typeof fbq == 'function') {
48
- fbq('trackCustom', 'JoinChat', { eventAction: 'click', eventLabel: link });
49
  }
50
  };
51
 
16
  };
17
 
18
  // Trigger Google Analytics event
19
+ joinchat_obj.send_event = function (label, action) {
20
  var ga_tracker = window[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');
27
  var trackers = ga_tracker.getAll();
28
  trackers.forEach(function (tracker) {
29
+ tracker.send("event", 'JoinChat', action, label);
30
  });
31
  } else if (typeof gtag == 'function') {
32
+ gtag('event', action, {
33
  'event_category': 'JoinChat',
34
+ 'event_label': label,
35
  'transport_type': 'beacon'
36
  });
37
  }
40
  if (typeof dataLayer == 'object') {
41
  dataLayer.push({
42
  'event': 'JoinChat',
43
+ 'eventAction': action,
44
+ 'eventLabel': label
45
  });
46
  }
47
 
48
  // Send Facebook Pixel custom event
49
  if (typeof fbq == 'function') {
50
+ fbq('trackCustom', 'JoinChat', { eventAction: action, eventLabel: label });
51
  }
52
  };
53
 
public/js/joinchat.min.js CHANGED
@@ -1 +1 @@
1
- !function(t,o){"use strict";o.joinchat_obj=o.joinchat_obj||{},joinchat_obj=t.extend({$div:null,settings:null,store:null,chatbox:!1,is_mobile:!1},joinchat_obj),joinchat_obj.$=function(o){return t(o||this.$div,this.$div)},joinchat_obj.send_event=function(t){var e=o[this.settings.ga_tracker||"ga"];"function"==typeof e&&"function"==typeof e.getAll?(e("set","transport","beacon"),e.getAll().forEach(function(o){o.send("event","JoinChat","click",t)})):"function"==typeof gtag&&gtag("event","click",{event_category:"JoinChat",event_label:t,transport_type:"beacon"});"object"==typeof dataLayer&&dataLayer.push({event:"JoinChat",eventAction:"click",eventLabel:t}),"function"==typeof fbq&&fbq("trackCustom","JoinChat",{eventAction:"click",eventLabel:t})},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"),t(document).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"),t(document).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(e,n){var i={link:this.whatsapp_link(e||this.settings.telephone,n||this.settings.message_send)},a=new RegExp("^https?://(wa.me|(api|web|chat).whatsapp.com|"+location.hostname.replace(".",".")+")/.*","i");t(document).trigger("joinchat:open",[i,this.settings]),a.test(i.link)?(this.send_event(i.link),o.open(i.link,"joinchat")):console.error("Join.chat: the link doesn't seem safe, it must point to the current domain or whatsapp.com")},t(function(){joinchat_obj.$div=t(".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(){var e,n,i=1e3*joinchat_obj.settings.button_delay,a=1e3*joinchat_obj.settings.message_delay,s=!!joinchat_obj.settings.message_hash,c=!!joinchat_obj.$(".joinchat__box").length,h=parseInt(joinchat_obj.store.getItem("joinchat_views")||1)>=joinchat_obj.settings.message_views,j=-1!==(joinchat_obj.store.getItem("joinchat_hashes")||"").split(",").filter(Boolean).indexOf(joinchat_obj.settings.message_hash||"none");function _(){clearTimeout(n),joinchat_obj.chatbox_show()}function b(){joinchat_obj.save_hash(),joinchat_obj.chatbox_hide()}function r(){c&&!joinchat_obj.chatbox?_():(b(),joinchat_obj.open_whatsapp())}var l="joinchat--show";j||s&&a&&!joinchat_obj.settings.message_badge&&h||(l+=" joinchat--tooltip");setTimeout(function(){joinchat_obj.$div.addClass(l)},i),s&&!j&&a&&(joinchat_obj.settings.message_badge?n=setTimeout(function(){joinchat_obj.$(".joinchat__badge").addClass("joinchat__badge--in")},i+a):h&&(n=setTimeout(_,i+a)));c&&!joinchat_obj.is_mobile&&t(".joinchat__button",joinchat_obj.$div).mouseenter(function(){e=setTimeout(_,1500)}).mouseleave(function(){clearTimeout(e)});if(t(".joinchat__button",joinchat_obj.$div).click(r),t(".joinchat__close",joinchat_obj.$div).click(b),t(".joinchat__box__scroll").on("mousewheel DOMMouseScroll",function(t){t.preventDefault();var o=t.originalEvent.wheelDelta||-t.originalEvent.detail;this.scrollTop+=30*(o<0?1:-1)}),joinchat_obj.is_mobile){var g,u=o.innerHeight;t(document).on("focus blur","input, textarea",function(e){t(e.target).closest(joinchat_obj.$div)||(clearTimeout(g),g=setTimeout(function(){joinchat_obj.$div.toggleClass("joinchat--show",o.innerHeight>.7*u)},800))})}if(t(document).on("click",".joinchat_open",function(t){t.preventDefault(),joinchat_obj.chatbox||r()}),t(document).on("click",".joinchat_close",function(t){t.preventDefault(),b()}),c&&"IntersectionObserver"in o){var d=t(".joinchat_show,.joinchat_force_show");if(d.length>0){var p=new IntersectionObserver(function(o){t.each(o,function(){if(this.intersectionRatio>0&&(!j||t(this.target).hasClass("joinchat_force_show")))return _(),p.disconnect(),!1})});d.each(function(){p.observe(this)})}}t(document).trigger("joinchat:start")}():t(document).on("click",".joinchat_open",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);
1
+ !function(t,o){"use strict";o.joinchat_obj=o.joinchat_obj||{},joinchat_obj=t.extend({$div:null,settings:null,store:null,chatbox:!1,is_mobile:!1},joinchat_obj),joinchat_obj.$=function(o){return t(o||this.$div,this.$div)},joinchat_obj.send_event=function(t,e){var n=o[this.settings.ga_tracker||"ga"];(t=t||"",e=e||"click","function"==typeof n&&"function"==typeof n.getAll)?(n("set","transport","beacon"),n.getAll().forEach(function(o){o.send("event","JoinChat",e,t)})):"function"==typeof gtag&&gtag("event",e,{event_category:"JoinChat",event_label:t,transport_type:"beacon"});"object"==typeof dataLayer&&dataLayer.push({event:"JoinChat",eventAction:e,eventLabel:t}),"function"==typeof fbq&&fbq("trackCustom","JoinChat",{eventAction:e,eventLabel:t})},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"),t(document).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"),t(document).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(e,n){var i={link:this.whatsapp_link(e||this.settings.telephone,n||this.settings.message_send)},a=new RegExp("^https?://(wa.me|(api|web|chat).whatsapp.com|"+location.hostname.replace(".",".")+")/.*","i");t(document).trigger("joinchat:open",[i,this.settings]),a.test(i.link)?(this.send_event(i.link),o.open(i.link,"joinchat")):console.error("Join.chat: the link doesn't seem safe, it must point to the current domain or whatsapp.com")},t(function(){joinchat_obj.$div=t(".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(){var e,n,i=1e3*joinchat_obj.settings.button_delay,a=1e3*joinchat_obj.settings.message_delay,s=!!joinchat_obj.settings.message_hash,c=!!joinchat_obj.$(".joinchat__box").length,h=parseInt(joinchat_obj.store.getItem("joinchat_views")||1)>=joinchat_obj.settings.message_views,j=-1!==(joinchat_obj.store.getItem("joinchat_hashes")||"").split(",").filter(Boolean).indexOf(joinchat_obj.settings.message_hash||"none");function _(){clearTimeout(n),joinchat_obj.chatbox_show()}function b(){joinchat_obj.save_hash(),joinchat_obj.chatbox_hide()}function r(){c&&!joinchat_obj.chatbox?_():(b(),joinchat_obj.open_whatsapp())}var l="joinchat--show";j||s&&a&&!joinchat_obj.settings.message_badge&&h||(l+=" joinchat--tooltip");setTimeout(function(){joinchat_obj.$div.addClass(l)},i),s&&!j&&a&&(joinchat_obj.settings.message_badge?n=setTimeout(function(){joinchat_obj.$(".joinchat__badge").addClass("joinchat__badge--in")},i+a):h&&(n=setTimeout(_,i+a)));c&&!joinchat_obj.is_mobile&&t(".joinchat__button",joinchat_obj.$div).mouseenter(function(){e=setTimeout(_,1500)}).mouseleave(function(){clearTimeout(e)});if(t(".joinchat__button",joinchat_obj.$div).click(r),t(".joinchat__close",joinchat_obj.$div).click(b),t(".joinchat__box__scroll").on("mousewheel DOMMouseScroll",function(t){t.preventDefault();var o=t.originalEvent.wheelDelta||-t.originalEvent.detail;this.scrollTop+=30*(o<0?1:-1)}),joinchat_obj.is_mobile){var g,u=o.innerHeight;t(document).on("focus blur","input, textarea",function(e){t(e.target).closest(joinchat_obj.$div)||(clearTimeout(g),g=setTimeout(function(){joinchat_obj.$div.toggleClass("joinchat--show",o.innerHeight>.7*u)},800))})}if(t(document).on("click",".joinchat_open",function(t){t.preventDefault(),joinchat_obj.chatbox||r()}),t(document).on("click",".joinchat_close",function(t){t.preventDefault(),b()}),c&&"IntersectionObserver"in o){var d=t(".joinchat_show,.joinchat_force_show");if(d.length>0){var p=new IntersectionObserver(function(o){t.each(o,function(){if(this.intersectionRatio>0&&(!j||t(this.target).hasClass("joinchat_force_show")))return _(),p.disconnect(),!1})});d.each(function(){p.observe(this)})}}t(document).trigger("joinchat:start")}():t(document).on("click",".joinchat_open",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);