Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update intercom flutter web: 1.0.2 #402

Merged
merged 2 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions intercom_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 8.0.11

* Automatically Injected Intercom Script, if it is not added.

## 8.0.10

* Bump Intercom iOS SDK version to 16.5.5
Expand Down
6 changes: 3 additions & 3 deletions intercom_flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ Intercom.instance.sendTokenToIntercom(intercomToken);
Now, if either Firebase direct (e.g. by your own backend server) or Intercom sends you a message, it will be delivered to your app.

### Web
Add the below script inside body tag in the index.html file located under web folder
You don't need to do any extra steps for the web. Intercom script will be automatically injected.
But you can pre-define some Intercom settings, if you want (optional).
```html
<script>
window.intercomSettings = {
hide_default_launcher: true, // set this to false, if you want to show the default launcher
hide_default_launcher: true, // hide the default launcher
};
(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s, x);};if(document.readyState==='complete'){l();}else if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();
</script>
```
#### Following functions are not yet supported on Web:
Expand Down
3 changes: 0 additions & 3 deletions intercom_flutter/example/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
window.intercomSettings = {
hide_default_launcher: true, // set this to false, if you want to show the default launcher
};

(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s, x);};if(document.readyState==='complete'){l();}else if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();

</script>
<!-- This script installs service_worker.js to provide PWA functionality to
application. For more information, see:
Expand Down
4 changes: 2 additions & 2 deletions intercom_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: intercom_flutter
description: Flutter plugin for Intercom integration. Provides in-app messaging
and help-center Intercom services
version: 8.0.10
version: 8.0.11
homepage: https://github.com/v3rm0n/intercom_flutter

dependencies:
Expand All @@ -10,7 +10,7 @@ dependencies:
flutter_web_plugins:
sdk: flutter
intercom_flutter_platform_interface: ^2.0.0
intercom_flutter_web: ^1.0.1
intercom_flutter_web: ^1.0.2

dev_dependencies:
flutter_test:
Expand Down
Loading