aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/steamchat
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/steamchat
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/steamchat')
-rw-r--r--recipes/steamchat/index.js4
-rw-r--r--recipes/steamchat/package.json2
-rw-r--r--recipes/steamchat/webview.js10
3 files changed, 8 insertions, 8 deletions
diff --git a/recipes/steamchat/index.js b/recipes/steamchat/index.js
index 9598981..7edfda5 100644
--- a/recipes/steamchat/index.js
+++ b/recipes/steamchat/index.js
@@ -1,5 +1,5 @@
1module.exports = (Ferdi) => class SteamChat extends Ferdi { 1module.exports = (Ferdium) => class SteamChat extends Ferdium {
2 overrideUserAgent() { 2 overrideUserAgent() {
3 return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(); 3 return window.navigator.userAgent.replace(/(Ferdium|Electron)\/\S+ \([^)]+\)/g, '').trim();
4 } 4 }
5}; 5};
diff --git a/recipes/steamchat/package.json b/recipes/steamchat/package.json
index b13ab5d..ffc6230 100644
--- a/recipes/steamchat/package.json
+++ b/recipes/steamchat/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "steamchat", 2 "id": "steamchat",
3 "name": "SteamChat", 3 "name": "SteamChat",
4 "version": "1.3.2", 4 "version": "1.4.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://steamcommunity.com/chat", 7 "serviceURL": "https://steamcommunity.com/chat",
diff --git a/recipes/steamchat/webview.js b/recipes/steamchat/webview.js
index 2990131..cfe84f3 100644
--- a/recipes/steamchat/webview.js
+++ b/recipes/steamchat/webview.js
@@ -1,18 +1,18 @@
1module.exports = Ferdi => { 1module.exports = Ferdium => {
2 const getMessages = () => { 2 const getMessages = () => {
3 // get new msg count 3 // get new msg count
4 let count = 0; 4 let count = 0;
5 const counters = document.querySelectorAll('[class*=FriendMessageCount]'); 5 const counters = document.querySelectorAll('[class*=FriendMessageCount]');
6 Array.prototype.filter.call(counters, countValue => { 6 Array.prototype.filter.call(counters, countValue => {
7 if (countValue) { 7 if (countValue) {
8 count += Ferdi.safeParseInt(countValue.textContent); 8 count += Ferdium.safeParseInt(countValue.textContent);
9 } 9 }
10 }); 10 });
11 11
12 const indirectMessages = document.querySelectorAll( 12 const indirectMessages = document.querySelectorAll(
13 '[class*=ChatUnreadMessageIndicator]', 13 '[class*=ChatUnreadMessageIndicator]',
14 ).length; 14 ).length;
15 Ferdi.setBadge(count, indirectMessages); 15 Ferdium.setBadge(count, indirectMessages);
16 16
17 // force scroll to bottom of chat window 17 // force scroll to bottom of chat window
18 const chatBoxes = document.querySelectorAll('.chat_dialog'); 18 const chatBoxes = document.querySelectorAll('.chat_dialog');
@@ -28,7 +28,7 @@ module.exports = Ferdi => {
28 } 28 }
29 }; 29 };
30 30
31 Ferdi.loop(getMessages); 31 Ferdium.loop(getMessages);
32 32
33 document.addEventListener( 33 document.addEventListener(
34 'click', 34 'click',
@@ -38,7 +38,7 @@ module.exports = Ferdi => {
38 if (link && link.getAttribute('target') === '_top') { 38 if (link && link.getAttribute('target') === '_top') {
39 event.preventDefault(); 39 event.preventDefault();
40 event.stopPropagation(); 40 event.stopPropagation();
41 Ferdi.openNewWindow(link.getAttribute('href')); 41 Ferdium.openNewWindow(link.getAttribute('href'));
42 } 42 }
43 }, 43 },
44 true, 44 true,