aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-04-24 16:09:27 +0200
committerLibravatar GitHub <noreply@github.com>2020-04-24 16:09:27 +0200
commit61e025df9fb817f00f56d1705406227c282a7534 (patch)
tree5de3858b7a196ec79345fb091026190dcb8363f9
parentUse GitHub notifications center and direct notifications (#133) (diff)
parentUpdate Integration documentation (diff)
downloadferdium-recipes-61e025df9fb817f00f56d1705406227c282a7534.tar.gz
ferdium-recipes-61e025df9fb817f00f56d1705406227c282a7534.tar.zst
ferdium-recipes-61e025df9fb817f00f56d1705406227c282a7534.zip
Merge pull request #136 from mahadevans87/patch-1
Update Integration documentation
-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