44[ ![ All Contributors] ( https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square )] ( #contributors- )
55<!-- ALL-CONTRIBUTORS-BADGE:END -->
66
7- [ ![ Contributor Covenant] ( https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg )] ( CODE_OF_CONDUCT.md )
7+ [ ![ Contributor Covenant] ( https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg )] ( CODE_OF_CONDUCT.md )
88
99An npm module that allows you to mitigate the negative performance and user
1010experience impact of chat tools. ` react-live-chat-loader ` shows a fake widget
@@ -22,7 +22,7 @@ Made by the team at [♠ Calibre](https://calibreapp.com/), your performance com
22226 . [ Contributing] ( #-contributing )
23237 . [ Examples] ( #-examples )
2424
25- ## 💡 How it Works
25+ ## 💡 How it Works
2626
2727Chat widgets rely heavily on JavaScript which comes at a cost. Given the
2828significant impact that comes from the download, parse, compile and execution of
@@ -40,7 +40,7 @@ connection (using `navigator.connection.effectiveType`) or has data-saver enable
4040
4141> ⚠️ ** Please note** : Some chat widget providers open automatically based on the people’s interaction from their last session.
4242
43- ## 📥 Installation
43+ ## 📥 Installation
4444
4545To download react-live-chat-loader run:
4646
@@ -126,6 +126,8 @@ You can pass the following props to the `LiveChatLoaderProvider` provider:
126126- ` idlePeriod ` : How long to wait in ms before loading the provider. Default is
127127 ` 2000 ` . Set to ` 0 ` to never load. This value is used in a ` setTimeout ` in
128128 browsers that don't support ` requestIdleCallback ` .
129+ - ` beforeInit ` : A function to be called after the script has loaded, but before the chat provider has been initialized (optional)
130+ - ` onReady ` : A function to be called once the script has been loaded, the chat provider has been initialized and is ready for use (optional)
129131
130132## 💬 Supported Providers
131133
@@ -338,9 +340,11 @@ You can customise the Chatwoot Widget by passing the following props to the
338340</details >
339341
340342## ➕ Adding a Provider
343+
341344To add a new live chat provider, follow the steps in [ Contributing: Adding a Provider] ( CONTRIBUTING.md#-adding-a-provider ) .
342345
343346## 🙌 Contributing
347+
344348Happy to hear you’re interested in contributing to React Live Chat Loader! Please find our contribution guidelines [ here] ( CONTRIBUTING.md ) .
345349
346350## 🖥️ Examples
@@ -352,7 +356,7 @@ Happy to hear you’re interested in contributing to React Live Chat Loader! Ple
352356- [ How to avoid performance regressions when using live chat tools] ( https://calibreapp.com/blog/fast-live-chat )
353357- [ Reducing the Intercom Messenger bundle size by 65%] ( https://www.intercom.com/blog/reducing-intercom-messenger-bundle-size/ )
354358
355- ## ✨ Contributors
359+ ## ✨ Contributors
356360
357361Thanks goes to these wonderful people ([ emoji key] ( https://allcontributors.org/docs/en/emoji-key ) ):
358362
0 commit comments