Skip to content

Commit

Permalink
docs: fix Crisp links (#4143)
Browse files Browse the repository at this point in the history
  • Loading branch information
khvn26 authored Jun 11, 2024
1 parent bdf0237 commit a6b55e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/plugins/crisp-chat-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ const enableCrispLinks = () => {
oc.onclick = ({ target }) => {
if (typeof $crisp !== 'undefined') {
$crisp.push(['do', 'chat:open']);
if (target.dataset.crispChatMessage) {
$crisp.push(['set', 'message:text', [e.target.dataset.crispChatMessage]]);
let dataCrispChatMessage = target.getAttribute('data-crisp-chat-message');
if (dataCrispChatMessage) {
$crisp.push(['set', 'message:text', [dataCrispChatMessage]]);
}
}
};
Expand Down

0 comments on commit a6b55e2

Please sign in to comment.