aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/thelounge
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2022-04-18 06:51:50 -0500
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2022-04-18 06:51:50 -0500
commit18801ed0c02627e87639dc0848cab44dacc18be2 (patch)
tree15e56ba66c68bf7b4594e6c9fdef44e037b4be31 /recipes/thelounge
parentRemove deprecated webPreference flag (diff)
downloadferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.tar.gz
ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.tar.zst
ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.zip
Rebranded from 'ferdi' to 'ferdium' (companion changes for the main repo PR #2)
Diffstat (limited to 'recipes/thelounge')
-rw-r--r--recipes/thelounge/index.js2
-rw-r--r--recipes/thelounge/package.json2
-rw-r--r--recipes/thelounge/webview-unsafe.js6
-rw-r--r--recipes/thelounge/webview.js10
4 files changed, 10 insertions, 10 deletions
diff --git a/recipes/thelounge/index.js b/recipes/thelounge/index.js
index 23607bd..dd41f72 100644
--- a/recipes/thelounge/index.js
+++ b/recipes/thelounge/index.js
@@ -1 +1 @@
module.exports = Ferdi => Ferdi; module.exports = Ferdium => Ferdium;
diff --git a/recipes/thelounge/package.json b/recipes/thelounge/package.json
index d7b2632..f5dc06f 100644
--- a/recipes/thelounge/package.json
+++ b/recipes/thelounge/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "thelounge", 2 "id": "thelounge",
3 "name": "The Lounge", 3 "name": "The Lounge",
4 "version": "1.2.0", 4 "version": "1.3.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "hasCustomUrl": true, 7 "hasCustomUrl": true,
diff --git a/recipes/thelounge/webview-unsafe.js b/recipes/thelounge/webview-unsafe.js
index 3f1358a..9a40933 100644
--- a/recipes/thelounge/webview-unsafe.js
+++ b/recipes/thelounge/webview-unsafe.js
@@ -1,7 +1,7 @@
1// Monkey patch ServiceWorker.postMessage so that it will actually post a notification in Ferdi: 1// Monkey patch ServiceWorker.postMessage so that it will actually post a notification in Ferdium:
2 2
3function newPostMessage(options) { 3function newPostMessage(options) {
4 window.ferdi.displayNotification(options.title, options); 4 window.ferdium.displayNotification(options.title, options);
5} 5}
6 6
7ServiceWorker.prototype.postMessage = newPostMessage; 7ServiceWorker.prototype.postMessage = newPostMessage;
diff --git a/recipes/thelounge/webview.js b/recipes/thelounge/webview.js
index 394c867..5d3dbb7 100644
--- a/recipes/thelounge/webview.js
+++ b/recipes/thelounge/webview.js
@@ -25,7 +25,7 @@ function countsOfUnreadMessagesAfterMarker(unreadMarker) {
25 return [unread, unreadHighlighted]; 25 return [unread, unreadHighlighted];
26} 26}
27 27
28module.exports = Ferdi => { 28module.exports = Ferdium => {
29 var unreadMessagesAtLastActivity = 0; 29 var unreadMessagesAtLastActivity = 0;
30 var unreadHighlightedMessagesAtLastActivity = 0; 30 var unreadHighlightedMessagesAtLastActivity = 0;
31 31
@@ -41,7 +41,7 @@ module.exports = Ferdi => {
41 41
42 for (const directElement of directElements) { 42 for (const directElement of directElements) {
43 if (directElement.textContent.length > 0) { 43 if (directElement.textContent.length > 0) {
44 direct += Ferdi.safeParseInt(directElement.textContent); 44 direct += Ferdium.safeParseInt(directElement.textContent);
45 } 45 }
46 } 46 }
47 47
@@ -79,13 +79,13 @@ module.exports = Ferdi => {
79 unreadHighlightedMessagesAtLastActivity = 0; 79 unreadHighlightedMessagesAtLastActivity = 0;
80 } 80 }
81 81
82 Ferdi.setBadge(direct, indirect); 82 Ferdium.setBadge(direct, indirect);
83 }; 83 };
84 84
85 Ferdi.loop(getMessages); 85 Ferdium.loop(getMessages);
86 86
87 // We need to monkey patch ServierWorker.postMessage so that notifications 87 // We need to monkey patch ServierWorker.postMessage so that notifications
88 // will work, and that needs to be done without context isolation: 88 // will work, and that needs to be done without context isolation:
89 const path = require('path'); 89 const path = require('path');
90 Ferdi.injectJSUnsafe(path.join(__dirname, 'webview-unsafe.js')); 90 Ferdium.injectJSUnsafe(path.join(__dirname, 'webview-unsafe.js'));
91}; 91};