Skip to content

Releases

2.0.0

Choose a tag to compare

@afbora afbora released this 31 Oct 20:59
0f7ad24

WhatsApp Button 2.0 works with Kirby 5 and Kirby 6, can be set up in the Panel and knows your office hours.

New

  • Panel settings. Add tabs/whatsapp-button to your site blueprint, and editors can change the number, the name, the avatar, the messages, the agents and the office hours. Empty fields keep the values from your config.
  • Multiple agents. List several people or teams, each with their own number, status and avatar. Visitors choose who they want to chat with.
  • Office hours. Set the days and times you are available. Outside of them, the button shows an offline status and its own messages, or hides itself. The check runs in the browser of the visitor, so it also works with Kirby's page cache.
  • Page placeholders. Messages can contain {{ page.title }} and {{ page.url }}, so you know which page a visitor wrote from.
  • Translations. All texts are available in English, German and Turkish and follow the language of the page.
  • Keyboard and screen readers. The buttons are real buttons with labels, Enter sends the message and Escape closes the chat window.

Fixed

  • Messages with &, #, + or % arrived cut off in WhatsApp.
  • The default avatar was loaded from ui-avatars.com with the name of your site for every visitor. It now shows the initials of the name, without a request to another service.
  • The message input used the default font of the browser instead of the font of your site.
  • Two buttons on one page got in each other's way.
  • The chat window didn't fit on small screens.
  • The plugin read the site title while it was loaded, before other plugins and the current language.
  • doNotDisturb opened the chat window even with autoOpen turned off.

Changed

  • The widget starts without an inline script, so it works with a Content Security Policy.
  • The stylesheet and the script are loaded with a cache busting URL. The plugin has no build step anymore.
  • WhatsApp links use https://wa.me/.
  • The plugin sets no cookies anymore. doNotDisturb remembers the opened chat window in the session storage.

Breaking changes

  • Requires Kirby 5 or 6 and PHP 8.2 or newer. For Kirby 3.4 to 4, keep using 1.0.3.
  • Without an avatar, the chat window shows the initials of the name instead of an image from ui-avatars.com.
  • The assets moved to assets/whatsapp-button.css and assets/whatsapp-button.js, the container has no whatsapp-button ID anymore, and the open chat window only uses the is-open class. If you styled the widget, check your CSS.

See the README for all options and the upgrade notes.

Repository: https://github.com/owebstudio/kirby-whatsapp-button
License: MIT, see LICENSE

1.0.3

Choose a tag to compare

@afbora afbora released this 30 Oct 13:06
cf9e80d

Security

  • The chat name, status, messages and badge text are now always shown as plain text. Before, HTML in these options was rendered on the page. Because the name defaults to the site title, anyone who could edit the site title in the Panel could run scripts for every visitor of your site. Please update.
  • A value like <!-- in one of the options no longer breaks the rest of the page.

Upgrade notes

  • If you used HTML in these options (for example <br> in a message), it is now shown as text. HTML was never documented as supported.
  • No other changes. Replace the plugin folder to update.

1.0.2

Choose a tag to compare

@afbora afbora released this 14 Sep 19:58
1.0.2

1.0.1

Choose a tag to compare

@afbora afbora released this 11 Sep 12:48
1.0.1 (Kirby Next)

1.0.0

Choose a tag to compare

@afbora afbora released this 04 Mar 16:08

Initial version