aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/discord/index.js
diff options
context:
space:
mode:
authorLibravatar Kishan B <kishancs46@gmail.com>2022-07-03 18:21:44 +0530
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2022-07-04 05:17:19 +0530
commit7eef5c339f73b02494ecea74c5ea084c842b1685 (patch)
tree130ed90ccb541670e7b7e420f351d671e5d33bbe /recipes/discord/index.js
parentFix pre-commit hooks (diff)
downloadferdium-recipes-7eef5c339f73b02494ecea74c5ea084c842b1685.tar.gz
ferdium-recipes-7eef5c339f73b02494ecea74c5ea084c842b1685.tar.zst
ferdium-recipes-7eef5c339f73b02494ecea74c5ea084c842b1685.zip
Add user agent fix for ARM macs (Fix #31)
Diffstat (limited to 'recipes/discord/index.js')
-rw-r--r--recipes/discord/index.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/recipes/discord/index.js b/recipes/discord/index.js
index a49555f..cd65352 100644
--- a/recipes/discord/index.js
+++ b/recipes/discord/index.js
@@ -1,8 +1,8 @@
1module.exports = Ferdium => class Discord extends Ferdium { 1module.exports = Ferdium => class Discord extends Ferdium {
2 overrideUserAgent() { 2 overrideUserAgent() {
3 const useragent = window.navigator.userAgent; 3 return window.navigator.userAgent.replace('(KHTML, like Gecko)', '(KHTML, like Gecko) discord/0.0.250')
4 const parts = useragent.split('(KHTML, like Gecko)'); 4 .replace('Electron', 'Discord')
5 5 .replace('Ferdium', 'Discord')
6 return parts.join('(KHTML, like Gecko) discord/0.0.250').replace('Electron', 'Discord').replace('Ferdium', 'Discord'); 6 .replace('Apple Mac OS X', 'Intel Mac OS X');
7 } 7 }
8}; 8};