aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/discord
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/discord')
-rw-r--r--recipes/discord/index.js4
-rw-r--r--recipes/discord/package.json2
-rw-r--r--recipes/discord/webview.js12
3 files changed, 9 insertions, 9 deletions
diff --git a/recipes/discord/index.js b/recipes/discord/index.js
index 9efa7a3..a49555f 100644
--- a/recipes/discord/index.js
+++ b/recipes/discord/index.js
@@ -1,8 +1,8 @@
1module.exports = Ferdi => class Discord extends Ferdi { 1module.exports = Ferdium => class Discord extends Ferdium {
2 overrideUserAgent() { 2 overrideUserAgent() {
3 const useragent = window.navigator.userAgent; 3 const useragent = window.navigator.userAgent;
4 const parts = useragent.split('(KHTML, like Gecko)'); 4 const parts = useragent.split('(KHTML, like Gecko)');
5 5
6 return parts.join('(KHTML, like Gecko) discord/0.0.250').replace('Electron', 'Discord').replace('Ferdi', 'Discord'); 6 return parts.join('(KHTML, like Gecko) discord/0.0.250').replace('Electron', 'Discord').replace('Ferdium', 'Discord');
7 } 7 }
8}; 8};
diff --git a/recipes/discord/package.json b/recipes/discord/package.json
index 6c61542..bba848b 100644
--- a/recipes/discord/package.json
+++ b/recipes/discord/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "discord", 2 "id": "discord",
3 "name": "Discord", 3 "name": "Discord",
4 "version": "1.5.1", 4 "version": "1.6.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://discordapp.com/login", 7 "serviceURL": "https://discordapp.com/login",
diff --git a/recipes/discord/webview.js b/recipes/discord/webview.js
index ab457c1..a72ef3a 100644
--- a/recipes/discord/webview.js
+++ b/recipes/discord/webview.js
@@ -4,7 +4,7 @@ function _interopRequireDefault(obj) {
4 return obj && obj.__esModule ? obj : { default: obj }; 4 return obj && obj.__esModule ? obj : { default: obj };
5} 5}
6 6
7module.exports = (Ferdi, settings) => { 7module.exports = (Ferdium, settings) => {
8 const getMessages = () => { 8 const getMessages = () => {
9 let directCount = 0; 9 let directCount = 0;
10 const directCountPerServer = document.querySelectorAll( 10 const directCountPerServer = document.querySelectorAll(
@@ -12,19 +12,19 @@ module.exports = (Ferdi, settings) => {
12 ); 12 );
13 13
14 for (const directCountBadge of directCountPerServer) { 14 for (const directCountBadge of directCountPerServer) {
15 directCount += Ferdi.safeParseInt(directCountBadge.textContent); 15 directCount += Ferdium.safeParseInt(directCountBadge.textContent);
16 } 16 }
17 17
18 const indirectCountPerServer = document.querySelectorAll( 18 const indirectCountPerServer = document.querySelectorAll(
19 '[class*="modeUnread-"]', 19 '[class*="modeUnread-"]',
20 ).length; 20 ).length;
21 21
22 Ferdi.setBadge(directCount, indirectCountPerServer); 22 Ferdium.setBadge(directCount, indirectCountPerServer);
23 }; 23 };
24 24
25 Ferdi.loop(getMessages); 25 Ferdium.loop(getMessages);
26 26
27 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); 27 Ferdium.injectCSS(_path.default.join(__dirname, 'service.css'));
28 28
29 // TODO: This whole block is duplicated between the 'discord' and 'skype' recipes - reuse 29 // TODO: This whole block is duplicated between the 'discord' and 'skype' recipes - reuse
30 document.addEventListener( 30 document.addEventListener(
@@ -43,7 +43,7 @@ module.exports = (Ferdi, settings) => {
43 event.stopPropagation(); 43 event.stopPropagation();
44 // TODO: Can we send an ipc event 'open-browser-window' to open the child window? (see the slack recipe for how to send an ipc message) 44 // TODO: Can we send an ipc event 'open-browser-window' to open the child window? (see the slack recipe for how to send an ipc message)
45 // TODO: Can we change the slack recipe to add a clickHandler for screensharing/video calls? (https://github.com/ferdium/ferdium-app/issues/1697) 45 // TODO: Can we change the slack recipe to add a clickHandler for screensharing/video calls? (https://github.com/ferdium/ferdium-app/issues/1697)
46 let win = new Ferdi.BrowserWindow({ 46 let win = new Ferdium.BrowserWindow({
47 width: 800, 47 width: 800,
48 height: window.innerHeight, 48 height: window.innerHeight,
49 minWidth: 600, 49 minWidth: 600,