aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorLibravatar Mahadevan Sreenivasan <mahadevan_sv@yahoo.com>2020-04-24 19:31:33 +0530
committerLibravatar GitHub <noreply@github.com>2020-04-24 19:31:33 +0530
commit953c45f564cc8213cce8acbeb4a8acd6d56d549e (patch)
tree5de3858b7a196ec79345fb091026190dcb8363f9 /docs
parentUse GitHub notifications center and direct notifications (#133) (diff)
downloadferdium-recipes-953c45f564cc8213cce8acbeb4a8acd6d56d549e.tar.gz
ferdium-recipes-953c45f564cc8213cce8acbeb4a8acd6d56d549e.tar.zst
ferdium-recipes-953c45f564cc8213cce8acbeb4a8acd6d56d549e.zip
Update Integration documentation
- Update the possibility of overriding user-agent in ferdi recipes so that user's know this options is possible.
Diffstat (limited to 'docs')
-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