aboutsummaryrefslogtreecommitdiffstats
path: root/docs/integration.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/integration.md')
-rw-r--r--docs/integration.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/integration.md b/docs/integration.md
index 174ba02..ef9e2a5 100644
--- a/docs/integration.md
+++ b/docs/integration.md
@@ -99,6 +99,19 @@ module.exports = Ferdi => class RocketChat extends Ferdi {
99 99
100`validateServer` needs to return a [`Promise`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), otherwise validation will fail. 100`validateServer` needs to return a [`Promise`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), otherwise validation will fail.
101 101
102
103If you need to override the default user-agent in your service, you can do so like the following snippet of code
104
105```
106 overrideUserAgent() {
107 return window.navigator.userAgent.replace(
108 /(Ferdi|Electron)\/\S+ \([^)]+\)/g,
109 ""
110 );
111 }
112```
113
114
102### webview.js 115### webview.js
103The webview.js is the actual script that will be loaded into the webview. Here you can do whatever you want to do in order perfectly integrate the service into Ferdi. For convenience, we have provided a very simple set of functions to set unread message badges (`Ferdi.setBadge()`) and inject CSS files (`Ferdi.injectCSS()`). 116The webview.js is the actual script that will be loaded into the webview. Here you can do whatever you want to do in order perfectly integrate the service into Ferdi. For convenience, we have provided a very simple set of functions to set unread message badges (`Ferdi.setBadge()`) and inject CSS files (`Ferdi.injectCSS()`).
104 117