chatr / chatra Goto Github PK
View Code? Open in Web Editor NEWOfficial Chatra module
Home Page: https://chatra.com
Official Chatra module
Home Page: https://chatra.com
Initially noticed it with this npm package, but it seems as though this is reproducible even with vanilla src
method.
Recorded a quick video here.
index.html
include Chatra's starting script PLUS the customWidgetButton
prop so that default chat button is hidden:<script>
(function(d, w, c) {
w.ChatraID = 'your_id';
var s = d.createElement('script');
w[c] = w[c] || function() {
(w[c].q = w[c].q || []).push(arguments);
};
s.async = true;
s.src = 'https://call.chatra.io/chatra.js';
if (d.head) d.head.appendChild(s);
})(document, window, 'Chatra');
window.ChatraSetup = {
customWidgetButton: '.custom-chat-button'
};
</script>
<button
class="custom-chat-button"
onclick="Chatra('openChat', true)"
>
Open chat
</button>
16.4
, though you can get more info from the desktop Safari console for some reason.Open chat
button.Chat window to open.
Looking through the inspector, I can see that the chatra--safari
gets chatra--expanded
class, though visually nothing changes.
Hi! I am working on a custom chat button inside sidebar
And looking for some api reference to check if there are some new messages appeared til last page load
Something like onNewMessage
callback, just to show some visual tip for user, but on init
It's nice that you already have an npm package. Some typings for TS will be helpful. Thanks!
Getting a continuous 'web-socket disconnected' and 'page not found' loop whenever the widget loads. Specifically error 404.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.